Download Native IP Stack For Zephyr™ OS

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Corecursion wikipedia , lookup

Transcript
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 & 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
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
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
Key Features
•
•
•
•
•
•
Task A
Task B
Native dual IPv6 and IPv4 stack
RX FIFO
TX FIFO
Built around network buffer pools
concept, efficient memory
TX fiber,
management
RX fiber
one per
interface
Possibility to have Zero/minimal
copy data path from user space to
device driver
Network
Network
interface
interface
Supports Thread IP requirements
One RX fiber
Native KConfig integration
Multiple TX fibers
● Global RX FIFO for receiving
● Each network device has
Uses automated testing harness ● array of network contexts
its own TX fiber
● Write to device drivers
(“sockets”)
for running network stack tests
●
Look up Tasks’ Rx FIFOs
TX FIFO
Application
Key L2 features
•
•
•
•
•
Dedicated OSI L2 abstraction
Supports multiple bearers and
interfaces such as IEEE
802.15.4 and Bluetooth*
Concurrent TX/RX on all
interfaces
Spec-compliant 802.15.4
implementation
Supports current Zephyr OS
network drivers with small
modification
Core IP Stack
(Core,
(Core, IPv6/4,
IPv6/4, ICMP/v6,UDP/TCP,
ICMP/v6,UDP/TCP, ...)
...)
Network Interface
(As many instances as hardware
devices, hiding the inner complexity
under a generic structure and API)
Management
API
Generic L2 API
Ethernet
IEEE 802.15.4
Bluetooth
6LoWPAN
Ethernet
driver
SLIP TAP
driver
CC2520
driver
*Other names and brands may be claimed as the property of others.
CC1200
driver
HCI/NRF
51
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
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
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
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
Thank you!