Jesper Dangaard Brouer <brouer@xxxxxxxxxx> writes: > The Intel based drivers (ixgbe + i40e) have implemented XDP with > headroom 192 bytes and not the recommended 256 bytes defined by > XDP_PACKET_HEADROOM. For generic-XDP, accept that this headroom > is also a valid size. > > Still for generic-XDP if headroom is less, still expand headroom to > XDP_PACKET_HEADROOM as this is the default in most XDP drivers. > > Tested on ixgbe with xdp_rxq_info --skb-mode and --action XDP_DROP: > - Before: 4,816,430 pps > - After : 7,749,678 pps > (Note that ixgbe in native mode XDP_DROP 14,704,539 pps) > > Signed-off-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx> > --- > include/uapi/linux/bpf.h | 1 + > net/core/dev.c | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index 906e9f2752db..14dc4f9fb3c8 100644 > --- a/include/uapi/linux/bpf.h > +++ b/include/uapi/linux/bpf.h > @@ -3312,6 +3312,7 @@ struct bpf_xdp_sock { > }; > > #define XDP_PACKET_HEADROOM 256 > +#define XDP_PACKET_HEADROOM_MIN 192 Do we need a comment here explaining why there are two values? -Toke