38c39af4df
Previously it was not always possible to prepend the header. It was not possible if the application neglected to reserve the space for headers. This is bad because it forces a buffer segment allocation even if the buffer had enough room for the headers. E.g. a payload of 10 bytes in a netbuf of 30 bytes would have been segmented. We now explicitly reject the buffer if it does not have the headroom. This allows us to do a nice thing; simplify L2CAP segmentation. We convert the SDU from the application into a PDU payload, by prepending the SDU header, i.e. the SDU length in the original buffer. This PDU payload is ready to be chunked into PDUs without having to keep track of where in the SDU we are. This has the effect of removing a bunch of logic in the segmentation machine. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no> Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no> |
||
---|---|---|
.. | ||
_doxygen | ||
_extensions/zephyr | ||
_scripts | ||
_static | ||
_templates | ||
build | ||
connectivity | ||
contribute | ||
develop | ||
hardware | ||
images | ||
introduction | ||
kernel | ||
project | ||
releases | ||
safety | ||
security | ||
services | ||
templates | ||
404.rst | ||
CMakeLists.txt | ||
conf.py | ||
glossary.rst | ||
index-tex.rst | ||
index.rst | ||
kconfig.rst | ||
known-warnings.txt | ||
LICENSING.rst | ||
Makefile | ||
requirements.txt | ||
substitutions.txt | ||
zephyr.doxyfile.in |