native ip stack for zephyr os
play

Native IP Stack For Zephyr OS Zephyr is a trademark of the Linux - PowerPoint PPT Presentation

Native IP Stack For Zephyr OS Zephyr is a trademark of the Linux Foundation. *Other names and brands may be claimed as the property of others. Why a native IP stack? Features missing in current Contiki based uIP stack No dual IPv6 &


  1. Native IP Stack For Zephyr™ OS Zephyr is a trademark of the Linux Foundation. *Other names and brands may be claimed as the property of others.

  2. Why a native IP stack? • Features missing in current Contiki based uIP stack • No dual IPv6 & IPv4 stack • Only one bearer (BLE / 802.15.4) usable at a time • One adapter only (like no 2 x 802.15.4 device) • Memory management issues (too big buffers for small amount of networking data) • Difficult to adapt uIP to multithreaded Zephyr OS • Automatic testing of the network stack

  3. Why not port 3rd party IP stack? • Use native stack instead of embedding existing stack like lwip or FNET > avoid adaptation layers which cause overhead > use same network buffers everywhere to utilize memory efficiently > unified look and feel of the APIs and code (helps maintenance) > creating testing harness easier with new stack

  4. How to do it? • Re-write IPv6 and IPv4 components to enable dual stack • Avoid any adaptation layers by utilizing Zephyr OS services directly • Utilize memory better by enabling IP stack to use smaller buffers that can be linked together • Creating a testing framework to test the stack automatically

  5. Key Features Task A Task A Task B Task B • Natjve dual IPv6 and IPv4 stack • RX FIFO TX FIFO Built around network bufger pools concept, effjcient memory TX fjber, TX fjber, management RX fjber one per RX fjber one per • interface Possibility to have Zero/minimal interface copy data path from user space to device driver Network Network Network Network • Supports Thread IP requirements interface interface interface interface • Natjve KConfjg integratjon One RX fjber Multjple TX fjbers ● ● Global RX FIFO for receiving Each network device has • Uses automated testjng harness ● array of network contexts its own TX fjber for running network stack tests ● (“sockets”) Write to device drivers ● Look up Tasks’ Rx FIFOs TX FIFO

  6. Applicatjon Key L2 features Applicatjon Core IP Stack Core IP Stack • Dedicated OSI L2 abstractjon (Core, IPv6/4, ICMP/v6,UDP/TCP, ...) (Core, IPv6/4, ICMP/v6,UDP/TCP, ...) • Supports multjple bearers and Network Interface Network Interface interfaces such as IEEE (As many instances as hardware (As many instances as hardware devices, hiding the inner complexity devices, hiding the inner complexity Management Management 802.15.4 and Bluetooth* under a generic structure and API) under a generic structure and API) API API • Concurrent TX/RX on all Generic L2 API Generic L2 API interfaces • Spec-compliant 802.15.4 Ethernet IEEE 802.15.4 Bluetooth Ethernet IEEE 802.15.4 Bluetooth implementatjon • Supports current Zephyr OS 6LoWPAN 6LoWPAN network drivers with small CC2520 CC1200 HCI/NRF Ethernet SLIP TAP CC2520 CC1200 HCI/NRF Ethernet SLIP TAP driver driver 51 driver driver driver driver 51 driver driver modifjcatjon *Other names and brands may be claimed as the property of others.

  7. Automatic Testing • Component tests created that will test some specific part of the networking stack (example: 6lo, neighbor mgmt, ip-addr mgmt etc.) • These tests are executed automatically for each commit • Full network stack conformance testing run periodically

  8. Network buffer overview • net_buf’s can be chained together to allow sending or receiving bigger amount of data • Amount of fragments is configurable by Kconfig option • Size of the network data part of the fragment can be configured via Kconfig • User specific data part in the first fragment can contain protocol specific information • Example: typical size of the network data part is 128 bytes for 802.15.4

  9. Network buffer details • Link layer header pre-allocated in the net_buf • Requires application data partitioning when sending the data • When receiving, the application needs to read the data in chunks as the data is not continuous • The L2 layer will insert link layer data to the start of the net_buf

  10. Release Plan • Currently native IP stack code under development can be found at “net” branch in Zephyr OS git [1] • Merge native IP stack to Zephyr OS 1.7 release [1] https://gerrit.zephyrproject.org/r/gitweb?p=zephyr.git;a=tree;h=refs/heads/net;hb=refs/heads/net

  11. Thank you!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend