zephyr/drivers/net
Reto Schneider 58cb4557f0 net: ppp: Optimize memory allocation
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>
2024-05-27 08:15:36 -07:00
..
canbus.c
CMakeLists.txt drivers: net: nsos: implement poll() syscall 2024-03-22 14:39:27 +01:00
Kconfig drivers: net: ppp: Add packet capture support 2024-04-04 17:02:11 +02:00
loopback.c drivers: Change drivers to support new IPv4 netmask setting API 2024-03-03 18:58:29 +01:00
nsos_adapt.c drivers: nsos: propagate POLLHUP from host's epoll() 2024-05-22 13:47:32 -05:00
nsos_errno.c drivers: net: nsos: new driver for Native Simulator offloaded sockets 2024-03-22 14:39:27 +01:00
nsos_errno.h drivers: net: nsos: new driver for Native Simulator offloaded sockets 2024-03-22 14:39:27 +01:00
nsos_fcntl.c drivers: nsos: fcntl: prefer Zephyr-specific macros over libc 2024-05-13 14:22:46 +02:00
nsos_fcntl.h drivers: net: nsos: add F_GETFL and F_SETFL support 2024-03-22 14:39:27 +01:00
nsos_netdb.c drivers: net: nsos: add DNS offload support 2024-03-22 14:39:27 +01:00
nsos_netdb.h drivers: net: nsos: add DNS offload support 2024-03-22 14:39:27 +01:00
nsos_socket.h drivers: nsos: support IPV6_V6ONLY getsockopt() and setsockopt() 2024-05-17 11:12:43 +02:00
nsos_sockets.c drivers: nsos: fix ENOMEM return from ZFD_IOCTL_POLL_PREPARE 2024-05-22 13:47:32 -05:00
nsos.h drivers: nsos: support ioctl(FIONREAD) 2024-05-17 11:12:43 +02:00
ppp.c net: ppp: Optimize memory allocation 2024-05-27 08:15:36 -07:00
slip.c drivers: net: use sys_rand8_get 2024-04-05 12:28:46 +02:00
slip.h