Skip to content
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

net: l2: Configurable headroom by drivers #84129

Open
krish2718 opened this issue Jan 17, 2025 · 0 comments
Open

net: l2: Configurable headroom by drivers #84129

krish2718 opened this issue Jan 17, 2025 · 0 comments
Labels
area: Ethernet Enhancement Changes/Updates/Additions to existing features

Comments

@krish2718
Copy link
Collaborator

Is your enhancement proposal related to a problem? Please describe.
Feature is zero-copy where the network buffer is allocated only once and used by the drivers as is. But L2/drivers have requirements of adding more headers, so, they can request a fixed headroom at the registration and networking stack takes that into account while allocating.

Describe the solution you'd like
Extend https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/net/l2/ethernet/ethernet.c#L514 and rename to include a driver's headroom, need to add a new member unsigned int extra_tx_headroom in https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/net/l2/ethernet/ethernet.c#L514 (or other appropriate structure).

Describe alternatives you've considered
Driver's now re-allocate the buffer with the extra headroom and copy the net buf.

Additional context

See #83994 and #50188, all of this work towards zero-copy TX data path.

@krish2718 krish2718 added area: Ethernet Enhancement Changes/Updates/Additions to existing features labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Ethernet Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

1 participant