-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BSD Sockets API: Offloading support #3706
Comments
by Paul Sokolovsky: Gil: We missed to have this explicitly captured, d'oh. This is yours otherwise, please edit as needed and set priority/fix version. Thanks. |
by Gilbert Pitney: The Zephyr IP stack designers placed a CONFIG_NET_OFFLOAD option in Zephyr, with the intention of supporting IP offload devices. See slide 7 in this slideset: However, since then, there has been progress on adding a BSD socket layer to Zephyr. See: https://jira.zephyrproject.org/browse/ZEP-1921 The "plan of record" was to offload via the CONFIG_NET_OFFLOAD option, but that would incur overhead mapping BSD socket APIs to Zephyr net_context APIs and then to the engine's offload socket APIs. To enable full offload, code space and energy savings entitlement to the network co-processor, the best solution would be to offload directly from the BSD API socket layer, similar to what is done in MyNewt. See: https://github.com/apache/incubator-mynewt-core/blob/develop/net/ip/mn_socket/include/mn_socket/mn_socket_ops.h The disadvantage is that would bypass any future IP routing logic in Zephyr (but not a big issue for IoT client nodes only connected via WiFi). The advantage will be in code and network data buffer savings (those will be offloaded to the co-processor) and power savings (the MCU can be powered down while the co-processor is maintaining open TCP sessions). |
by Mark Linkmeyer: Hi Gilbert Pitney , what's the status of this? Is it to be done in time for 1.9? Thx. |
by Gilbert Pitney: I think this will need to be pushed to 1.10, for a few reasons:
So, I think it's logical to move to 1.10. |
by Gilbert Pitney: updated to 1.10, and placed In Progress. |
as most of you are aware we are actively working to address sockets API compatibility on the stack design level. It'll happen earliest in 1.12 |
Removing 1.12 version assignment: This specific issue is more a discussion than a concrete action item. We will set a milestone after we agree on design and dependencies |
This patch enables BSD socket offload to a dedicated TCP/IP offload engine. This provides a simpler, more direct mechanism than going through NET_OFFLOAD (zsock -> net_context -> socket conversions) for those devices which provide complete TCP/IP offload at the BSD socket level, and whose use cases do not require IP routing between multiple network interfaces. To use, configure CONFIG_NET_SOCKETS_OFFLOAD=y, and register socket_offload_ops with this module. Fixes zephyrproject-rtos#3706 Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
If the SimpleLink WiFi driver is configured, and socket offload enabled, this revectors the Zephyr BSD socket APIs to the SimpleLink WiFi host driver BSD socket APIs, providing a direct offload of the TCP/IP stack to the CC3220SF network coprocessor. Fixes zephyrproject-rtos#3706 Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
If the SimpleLink WiFi driver is configured, and socket offload enabled, this revectors the Zephyr BSD socket APIs to the SimpleLink WiFi host driver BSD socket APIs, providing a direct offload of the TCP/IP stack to the CC3220SF network coprocessor. Fixes #3706 Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Reported by Paul Sokolovsky:
Users of devices which provide socket and TCP/IP offload engines would benefit in memory and power efficiency by enabling full offload of the Zephyr BSD socket APIs to a dedicated co-processor.
The TI CC3220SF SoC, part of the CC32XX SimpleLink SoC family of WiFi enabled devices, will be used as the initial socket offload implementation.
(Imported from Jira ZEP-2271)
The text was updated successfully, but these errors were encountered: