Multiple changes to improve alignment, memory use, and SLIP handling:
- Added ETH_PAD_SIZE=1 (lwipopts.h) and updated HAL/docs so BNEP zero-copy path yields 4-byte-aligned payloads, avoiding DMA bounce logic.
- Default TX queue size reduced to 3 (tinypan_config.h) and docstrings updated to clarify usable capacity and tuning guidance.
- BNEP: send a Multicast Filter SET request on NAP connect and handle filter responses (tinypan_bnep.c).
- Transport/netif: account for ETH_PAD_SIZE when removing/adding headers and when allocating/copying pbufs (tinypan_bnep_transport.c, tinypan_lwip_netif.c). Netif init and slip wiring adjusted for SLIP mode.
- SLIP transport rewritten to streaming FSM: incoming BLE bytes build pbuf chains incrementally and outgoing frames are streamed/escaped in chunks (tinypan_slip_transport.c). Removed static RX ring buffer and old sio stubs.
- Mock HAL: record a small ring history of recent TX buffers, add input validation, and expose history accessors for tests (hal/mock/tinypan_hal_mock.c).
- Supervisor: use transport flush callback and set link down on transitions to ensure consistent behavior (tinypan_supervisor.c).
- Tests updated to validate multicast filter request and to use the new mock TX history API; DHCP test plumbing adjusted to iterate recent TX history.
These changes reduce RAM usage, improve DMA alignment guarantees, prevent multicast broadcast storms, and make SLIP operation more stream-oriented and memory friendly.
Log in to leave a comment