Zephyr Network Buffers
summary
History and concrete design notes for Zephyr’s network buffer subsystem: it defines payload as length and container as size, uses a data pointer plus storage, and manipulates state with push/pull and add/remove; implementations include net_buf_simple and full net_buf, fixed and heap-backed pools, fragment chains, and pool metadata. Common failures are reference-counting and FIFO ownership mistakes; Zephyr 4.5 adds atomic take/drop and refcount hardening. Tools include pool profiling (get_available/get_max_used) and runtime hardening; changing uint16 fields to uint32 is proposed.
AI-written summary · about
chapters (12)
- 0:00Introduction to Zephyr network buffers
- 1:06Origins and design goals
- 8:52Terminology and data model
- 12:01Net buff simple variant
- 14:08Buffer pools and allocation
- 15:32Reference counting fundamentals
- 19:24Common mistakes and best practices
- 23:59Thread safety and SMP considerations
- 27:10Pool design and monitoring
- 29:14Recent enhancements in Zephyr 4.x
- 31:44Future improvements and proposals
- 33:36Q&A session
