On Tue, Jun 21, 2022 at 08:51:34AM -0700, John Fastabend wrote: > Andy Gospodarek wrote: > > This changes the section name for the bpf program embedded in these > > files to "xdp.frags" to allow the programs to be loaded on drivers that > > are using an MTU greater than PAGE_SIZE. Rather than directly accessing > > the buffers, the packet data is now accessed via xdp helper functions to > > provide an example for those who may need to write more complex > > programs. > > > > Signed-off-by: Andy Gospodarek <gospo@xxxxxxxxxxxx> > > --- > > OK. Although we lose the non frag example, but I guess that is fine and > highlights we don't maintain samples. > > Acked-by: John Fastabend <john.fastabend@xxxxxxxxx> Thanks for taking a look, John. My original changes had separate functions for handling MB vs single buffer access. I went with the patch I posted for a few reasons: - I liked the idea of one method for accessing the data via bpf_xdp_load_bytes -- even if that was less efficient for the single-buffer case. - I did not love how much code it added nor what it looked like when I was done. - Raw access of a non-frag xdp_buff is still available in xdp_rxq_info_kern.c if folks need an example of the most efficient way to benchmark an implementation. -andy
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature