Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-09-02 Thread Tom Herbert
On Mon, Aug 31, 2020 at 2:33 PM Daniel Borkmann wrote: > > On 8/31/20 9:25 PM, Harshitha Ramamurthy wrote: > > This patch adds a helper function called bpf_get_xdp_hash to calculate > > the hash for a packet at the XDP layer. In the helper function, we call > > the kernel flow dissector in non-skb

Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-09-01 Thread David Ahern
On 9/1/20 6:52 PM, Ramamurthy, Harshitha wrote: >> On 8/31/20 1:25 PM, Harshitha Ramamurthy wrote: >>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index >>> a613750d5515..bffe93b526e7 100644 >>> --- a/include/uapi/linux/bpf.h >>> +++ b/include/uapi/linux/bpf.h >>> @@ -3576,6 +3

RE: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-09-01 Thread Ramamurthy, Harshitha
Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function > > On 8/31/20 9:25 PM, Harshitha Ramamurthy wrote: > > This patch adds a helper function called bpf_get_xdp_hash to calculate > > the hash for a packet at the XDP layer. In the helper function, we > > call the

RE: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-09-01 Thread Ramamurthy, Harshitha
nder H ; Herbert, Tom > > Subject: Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function > > On 8/31/20 1:25 PM, Harshitha Ramamurthy wrote: > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index > > a613750d5515..bffe93b526e7 100644 > &g

Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-08-31 Thread Daniel Borkmann
On 8/31/20 9:25 PM, Harshitha Ramamurthy wrote: This patch adds a helper function called bpf_get_xdp_hash to calculate the hash for a packet at the XDP layer. In the helper function, we call the kernel flow dissector in non-skb mode by passing the net pointer to calculate the hash. So this comm

Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-08-31 Thread David Ahern
On 8/31/20 1:25 PM, Harshitha Ramamurthy wrote: > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index a613750d5515..bffe93b526e7 100644 > --- a/include/uapi/linux/bpf.h > +++ b/include/uapi/linux/bpf.h > @@ -3576,6 +3576,14 @@ union bpf_attr { > * the data in *dst*.

[PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-08-31 Thread Harshitha Ramamurthy
This patch adds a helper function called bpf_get_xdp_hash to calculate the hash for a packet at the XDP layer. In the helper function, we call the kernel flow dissector in non-skb mode by passing the net pointer to calculate the hash. Changes since RFC: - accounted for vlans(David Ahern) - return