Thread (27 messages) 27 messages, 6 authors, 2022-01-29

RE: [Intel-wired-lan] [PATCH v4 net-next 8/9] ixgbe: don't reserve excessive XDP_PACKET_HEADROOM on XSK Rx to skb

From: Penigalapati, Sandeep <hidden>
Date: 2022-01-11 11:51:52
Also in: bpf, intel-wired-lan, lkml

-----Original Message-----
From: Intel-wired-lan <redacted> On Behalf Of
Alexander Lobakin
Sent: Wednesday, December 8, 2021 7:37 PM
To: intel-wired-lan@lists.osuosl.org
Cc: Song Liu <redacted>; Jesper Dangaard Brouer
[off-list ref]; Daniel Borkmann [off-list ref]; Yonghong
Song [off-list ref]; Martin KaFai Lau [off-list ref]; John Fastabend
[off-list ref]; Alexei Starovoitov [off-list ref]; Andrii
Nakryiko [off-list ref]; Björn Töpel [off-list ref];
netdev@vger.kernel.org; Jakub Kicinski [off-list ref]; KP Singh
[off-list ref]; bpf@vger.kernel.org; David S. Miller
[off-list ref]; linux-kernel@vger.kernel.org
Subject: [Intel-wired-lan] [PATCH v4 net-next 8/9] ixgbe: don't reserve
excessive XDP_PACKET_HEADROOM on XSK Rx to skb

{__,}napi_alloc_skb() allocates and reserves additional NET_SKB_PAD
+ NET_IP_ALIGN for any skb.
OTOH, ixgbe_construct_skb_zc() currently allocates and reserves additional
`xdp->data - xdp->data_hard_start`, which is XDP_PACKET_HEADROOM for
XSK frames.
There's no need for that at all as the frame is post-XDP and will go only to the
networking stack core.
Pass the size of the actual data only to __napi_alloc_skb() and don't reserve
anything. This will give enough headroom for stack processing.

Fixes: d0bcacd0a130 ("ixgbe: add AF_XDP zero-copy Rx support")
Signed-off-by: Alexander Lobakin <redacted>
Reviewed-by: Michal Swiatkowski <redacted>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Tested-by: Sandeep Penigalapati <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help