Skip to content
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

Closed
zephyrbot opened this issue Jun 13, 2017 · 7 comments
Closed

BSD Sockets API: Offloading support #3706

zephyrbot opened this issue Jun 13, 2017 · 7 comments
Labels
area: Networking Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jun 13, 2017

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)

@zephyrbot
Copy link
Collaborator Author

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.

@zephyrbot
Copy link
Collaborator Author

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:
https://www.slideshare.net/linaroorg/bud17112-porting-the-ti-simplelink-cc32xx-wifi-stack-to-the-zephyr-iot-os

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).

@zephyrbot
Copy link
Collaborator Author

by Mark Linkmeyer:

Hi Gilbert Pitney , what's the status of this? Is it to be done in time for 1.9? Thx.

@zephyrbot
Copy link
Collaborator Author

by Gilbert Pitney:

I think this will need to be pushed to 1.10, for a few reasons:

  • It's not complete ;-)
  • The framework is based on a PR (#789) which has yet to be merged;
  • This is somewhat related to the "NET_OFFLOAD" feature, which I see from a Zephyr roadmap slide has also been pushed to 1.10;

So, I think it's logical to move to 1.10.

@zephyrbot
Copy link
Collaborator Author

by Gilbert Pitney:

updated to 1.10, and placed In Progress.

@zephyrbot zephyrbot added priority: medium Medium impact/importance bug area: Networking Enhancement Changes/Updates/Additions to existing features labels Sep 23, 2017
@zephyrbot zephyrbot added this to the v1.10.0 milestone Sep 23, 2017
@galak galak modified the milestones: v1.10.0, v1.11.0 Nov 29, 2017
@laperie
Copy link
Collaborator

laperie commented Feb 13, 2018

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

@laperie laperie modified the milestones: v1.11.0, v1.12.0 Feb 13, 2018
@laperie laperie removed this from the v1.12.0 milestone Apr 12, 2018
@laperie
Copy link
Collaborator

laperie commented Apr 12, 2018

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

GAnthony pushed a commit to GAnthony/zephyr that referenced this issue Aug 20, 2018
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>
GAnthony pushed a commit to GAnthony/zephyr that referenced this issue Aug 20, 2018
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>
@jukkar jukkar closed this as completed in c21b0fb Sep 11, 2018
jukkar pushed a commit that referenced this issue Sep 11, 2018
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants