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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
> Sent: Monday, August 31, 2020 1:33 PM
> To: Ramamurthy, Harshitha <harshitha.ramamurthy@xxxxxxxxx>;
> bpf@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; ast@xxxxxxxxxx;
> davem@xxxxxxxxxxxxx; kuba@xxxxxxxxxx
> Cc: dsahern@xxxxxxxxx; Duyck, Alexander H
> <alexander.h.duyck@xxxxxxxxx>; Herbert, Tom <tom.herbert@xxxxxxxxx>
> Subject: 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 kernel flow dissector in non-skb mode by passing the net
> > pointer to calculate the hash.
> 
> So this commit msg says 'what' the patch does, but says nothing about 'why'
> it is needed especially given there's the 1 mio insn limit in place where it
> should be easy to write that up in BPF anyway. The commit msg needs to
> have a clear rationale which describes the motivation behind this helper..
> why it cannot be done in BPF itself?

Okay, will add a rationale in the commit message in the next version for use-case. 

Thanks,
Harshitha
> 
> > Changes since RFC:
> > - accounted for vlans(David Ahern)
> > - return the correct hash by not using skb_get_hash(David Ahern)
> > - call __skb_flow_dissect in non-skb mode
> >




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux