#104667·zephyr

All netbuf shares the same alignment is not good

Author: liuhangtao-linkedsemiCreated Feb 27, 2026Updated Sep 18, 2026
Labelsarea: Zbusarea: Networking Buffers

Describe the bug

NET_BUF_ALIGNMENT was set to 32 for ethernet DMA. but zbus only requires sizeof(void *) alignment. It wastes a lot.

config NET_BUF_ALIGNMENT int "Network buffer alignment restriction" default 0 help Alignment restriction for network buffers. This is useful for some hardware IP with DMA that requires the buffers to be aligned to a certain byte boundary, or dealing with cache line restrictions. Default value of 0 means the alignment will be the size of a void pointer, any other value will force the alignment of a net buffer in bytes.

Regression

  • This is a regression.

Steps to reproduce

No response

Relevant log output

bash

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

No response

Additional Context

No response

Source: zephyrproject-rtos/zephyr