zephyr/include
Johan Hedberg e03151ee3e net: buf: Use precise buffer size given to NET_BUF_POOL
Until now, NET_BUF_POOL() would be opportunistic and allocate a few
more bytes extra for the buffer content if the given size wasn't a
multiple of 4. This is an issue however if the API user really wants
to have a precise size for the buffer so that e.g. net_buf_tailroom
gives meaningful and deterministic results.

This patch removes the opportunistic rounding up, basically leaving it
up to the application to decide if it wants to have unused padding in
the data structure or not.

The crucial thing here is to ensure that locating the user data
section (which is aligned to a 4-byte boundary) doesn't break, since
buf->size is used for that. However, the net_buf_user_data()
implementation already uses ROUND_UP() so the result will still be
the same even if buf->size is not a multiple of 4.

Change-Id: I4bc17139cda19a680180c2d326d417a41ad0d4cd
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-09 15:43:31 +03:00
..
arch nanokernel: move dataCopy() and bssZero() to common code 2016-07-08 18:23:11 +00:00
bluetooth Bluetooth: L2CAP: Add timeout handling 2016-07-08 12:05:33 +00:00
display drivers: Replace DEV_OK by 0 2016-03-16 19:30:04 -04:00
drivers usb: Add USB device controller header file 2016-06-30 00:21:39 +00:00
microkernel doc: fix warnings "Error when parsing function declaration." due to __deprecated 2016-06-16 13:11:06 -07:00
misc misc/kernel_event_logger.h: prototype irq entry point 2016-06-30 18:52:23 +00:00
net net: buf: Use precise buffer size given to NET_BUF_POOL 2016-07-09 15:43:31 +03:00
toolchain toolchain/common.h: remove comment 2016-06-29 05:23:55 +00:00
usb usb: Move LOW_BYTE and HIGH_BYTE to samples code 2016-06-30 17:51:58 +00:00
adc.h drivers: Replace DEV_OK by 0 2016-03-16 19:30:04 -04:00
aio_comparator.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
atomic.h Change BSD-3 licenses to Apache 2 2016-02-05 20:24:29 -05:00
cache.h cache: add implementation for cache-less systems 2016-02-05 20:25:24 -05:00
clock_control.h clock_control: extend API with clock rate query operation 2016-03-16 18:09:32 +00:00
counter.h doc: counter should be under device driver 2016-04-15 18:42:17 +00:00
device.h doc: Fix doxygen warnings about params not documented 2016-06-17 16:46:19 +00:00
dma.h doc: fix warnings about undefined ref and group without end. 2016-06-22 16:44:20 -05:00
flash.h flash: update API documentation 2016-05-25 13:30:41 +00:00
gpio.h gpio: add device config helpers 2016-06-22 16:47:16 +00:00
i2c.h i2c: add device config helpers 2016-06-22 16:47:16 +00:00
init.h power_mgmt: Add device power management support 2016-03-26 14:35:11 -04:00
ipm.h doc: fix "WARNING: Error in type declaration." in callback typedefs 2016-06-16 13:11:06 -07:00
irq_offload.h doc: Fix misuse of @file doxygen tag 2016-02-11 20:11:03 +00:00
irq.h headers: use __deprecated 2016-04-15 22:07:57 +00:00
kernel_version.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
linker-defs.h nanokernel: move dataCopy() and bssZero() to common code 2016-07-08 18:23:11 +00:00
linker-tool-gcc.h nios2: basic build, non-functional 2016-05-03 23:18:45 +00:00
linker-tool.h Fixed file description and applied doxygen style 2016-02-05 20:24:58 -05:00
microkernel.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
nanokernel.h nanokernel: add nano_fifo_put_list() APIs 2016-06-13 20:24:41 +00:00
pinmux.h doc: fix "WARNING: Error in type declaration." in callback typedefs 2016-06-16 13:11:06 -07:00
power.h doc: power_mgmt: Added Power Management documentation 2016-04-27 00:57:53 +00:00
pwm.h pwm: Create API to use time units. 2016-06-29 05:33:48 +00:00
rtc.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
section_tags.h ARM: ARC: put sw_isr_table in ROM by default 2016-02-05 20:25:21 -05:00
sections.h ARM: ARC: put sw_isr_table in ROM by default 2016-02-05 20:25:21 -05:00
sensor.h doc: revert unnamed union/struct workaround in favour of known-issues 2016-07-01 21:53:45 +00:00
shared_irq.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
spi.h doc: fix "WARNING: Error in type declaration." in callback typedefs 2016-06-16 13:11:06 -07:00
sw_isr_table.h nios2: add static interrupt handling code 2016-06-22 16:42:21 +00:00
sys_clock.h sys_clock: Add a helper to compute micro seconds 2016-04-07 16:51:07 +00:00
sys_io.h sys_io: don't allow negative bit offsets 2016-03-04 16:26:21 +00:00
toolchain.h doc: revert unnamed union/struct workaround in favour of known-issues 2016-07-01 21:53:45 +00:00
uart.h doc: revert unnamed union/struct workaround in favour of known-issues 2016-07-01 21:53:45 +00:00
watchdog.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
zephyr.h sysgen: generate sysgen.h instead of zephyr.h 2016-02-05 20:24:35 -05:00