diff options
| author | Arun Iyengar <aiyengar1990@gmail.com> | 2026-11-13 17:13:40 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-18 15:47:58 -0800 |
| commit | ece404eac250fc4be7aa4cec82e8c248cca83c28 (patch) | |
| tree | 1eb7e2f49f387c0ced1e96e4662102a4353d180e /tools/perf/scripts/python | |
| parent | d61480a622be17e5aa981f7ef4e6a0230b1d9049 (diff) | |
net: stmmac: drop the rest of the frame when napi_build_skb() fails
If napi_build_skb() fails on the first buffer of a frame that spans
several descriptors, stmmac_rx() drops that buffer but goes on with the
next descriptor of the same frame as if a new frame started there. The
rest of the frame is then passed up the stack as a frame of its own. A
frame spans several descriptors when it does not fit in the RX buffers
of one descriptor.
Mark the frame as errored instead, so that its remaining descriptors are
discarded like those of a frame with a receive error. The frame is
counted once in rx_dropped and once against the NAPI budget.
Found while working on the sun8i EMAC jumbo frame series, where frames
over 2032 bytes span several descriptors. Tested on an Orange Pi Zero2
(dwmac-sun8i, MTU 4070), w/ jumbo series and error injection.
Fixes: ec222003bd94 ("net: stmmac: Prepare to add Split Header support")
Cc: stable@vger.kernel.org
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261113-stmmac-rx-skb-fail-v1-1-fcaae89f2d2c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
