Skip to content

[Backport v4.0.99-ncs1-branch] nrf70: Fix zero copy #2761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 15, 2025

Conversation

NordicBuilder
Copy link
Contributor

Backport 81eaa46~3..81eaa46 from #2759.

krish2718 and others added 3 commits April 15, 2025 00:46
Only a single condition is specific to RAW mode, rest should be
unconditional.

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit a409d31)
(cherry picked from commit bad9e65)
…uffers

The headroom was not taken into account for variable size data
buffers when CONFIG_NET_L2_ETHERNET_RESERVE_HEADER was enabled.

Add a test case for it to make sure the reserve allocation works
properly.

Fixes #84053

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 18cd2d8)
(cherry picked from commit 6052253)
The size calculation for the first buffer, in case extra headroom is
requested, had a bug which could result in a size variable underflow
followed by net_buf exhaustion.

In case the net_buf size was larger than requested size, but smaller
than requested size + headroom, the whole buffer size was subtracted
from the requested size. This however did not take the extra headroom
into account and in effect could result in underflow.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit ea191bd)
(cherry picked from commit 81eaa46)
@krish2718 krish2718 force-pushed the backport-2759-to-v4.0.99-ncs1-branch branch from 6eb14b2 to 45eff64 Compare April 14, 2025 19:16
@carlescufi carlescufi merged commit 3ecc854 into v4.0.99-ncs1-branch Apr 15, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants