summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-10-27 16:49:39 -0700
committerJakub Kicinski <kuba@kernel.org>2026-10-29 08:49:32 -0700
commitc10f3420d59859df107838aa97b49357616d9b47 (patch)
treeafa2b73a282bf37bad79d35a96de562072066c64 /scripts/basic/split-include.c
parent1b2f02fb4ba92d01603c8261c94be8d348de65b0 (diff)
downloadlinux-c10f3420d59859df107838aa97b49357616d9b47.tar.gz
linux-c10f3420d59859df107838aa97b49357616d9b47.zip
eth: bnxt: free XDP frags when xdp_do_redirect() fails
When xdp_do_redirect() fails bnxt_rx_xdp() recycles the head page but not the frags of a multi-buffer frame. Their agg ring slots have already been refilled, so the pages leak, and the page pool can't be destroyed until they are returned, which will never happen. Redirect to an AF_XDP socket in copy mode fails this way with -ENOMEM whenever the socket's fill ring runs out of buffers. A socket bound without XDP_USE_SG also fails with -ENOSPC for every frame that doesn't fit in a single chunk. All the other drop paths in this function free the frags. Pointed out in LLM review of the first patch of the series. Tested on a BCM57504 at MTU 9000 by redirecting 60k 8000B ICMPv6 echo requests (a head and two agg buffers each) to lo, which can't transmit XDP frames. The page pools' inflight count stayed flat rather than growing by two pages per frame. Fixes: a7559bc8c17c ("bnxt: support transmit and free of aggregation buffers") Reviewed-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20261027234940.1267225-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions