net_pkt_alloc_buffer() deducts the free space from the requested number of bytes. As ppp_save_byte() calls net_pkt_alloc_buffer() when the packet has one byte available still, this causes all but the first net_buf in the packet to be of size CONFIG_NET_BUF_DATA_SIZE - 1. Consequences: - With CONFIG_NET_BUF_FIXED_DATA_SIZE enabled, one byte per net_buf gets wasted. - CONFIG_NET_BUF_DATA_SIZE has typically an even, likely even a power of two value. Using exactly one byte less per buffer causes operations that require aligned memory (e.g. DMA) to become inefficient or to not work at all. Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> |
||
|---|---|---|
| .. | ||
| canbus.c | ||
| CMakeLists.txt | ||
| Kconfig | ||
| loopback.c | ||
| nsos_adapt.c | ||
| nsos_errno.c | ||
| nsos_errno.h | ||
| nsos_fcntl.c | ||
| nsos_fcntl.h | ||
| nsos_netdb.c | ||
| nsos_netdb.h | ||
| nsos_socket.h | ||
| nsos_sockets.c | ||
| nsos.h | ||
| ppp.c | ||
| slip.c | ||
| slip.h | ||