[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 03 Mar 2020 13:12:09 +0100
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>, bpf@...r.kernel.org
Cc: Jesper Dangaard Brouer <brouer@...hat.com>, gamemann@...clan.com,
lrizzo@...gle.com, netdev@...r.kernel.org,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
Daniel Borkmann <borkmann@...earbox.net>,
Alexander Duyck <alexander.duyck@...il.com>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>
Subject: Re: [bpf-next PATCH] xdp: accept that XDP headroom isn't always equal XDP_PACKET_HEADROOM
Jesper Dangaard Brouer <brouer@...hat.com> 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@...hat.com>
> ---
> 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
Powered by blists - more mailing lists