mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
6b6c67eebf
Allocates segmented message buffers as slabs in a common pool for RX and TX. This reduces memory requirements for both TX and RX, as TX messages can be stored without the network and advertising buffer overhead, and RX can use only the slabs it needs, instead of allocating a full size segmented message. This approach also removes the need for decrypting the segments for each retransmission, reducing overall processing load. Slab based segmentation for tx also introduces queuing of segmented messages, which allows the application layer to send multiple messages to the same destination without violating Bluetooth Mesh specification v1.0.1, section 3.6.4.1. This mechanism is provided through a flag that blocks segmented messages to a destination which a message is already being sent to until the previous message finishes. This changes the SDU size configuration to a symmetrical RX_SEG_MAX/TX_SEG_MAX pair of configurations, plus a new segment pool side configuration. It also removes the binding between the TX_SEG_MAX config and the advertising buffers, reducing the minimum advertising buffer count from 6 to 3. this is port of 901b5b2b2b0a33f5426f621277e7238e8b83740b and 7443c1bd3ded598b56db3c931614072098af84e1