-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Only 1 NET_SOCKET_OFFLOAD driver can be used #18106
Comments
Yes, this has been sitting in my head for some time now and the idea was the same as you propose - to move the offloading underneath the The two problems I see with this solution that would be needed to solve:
|
@vanti, FYI. Yes, having a single socket offload device was a design limitation (which satisfied most TI use cases). The vtable work was pushed to ensure the existing socket offload got into the LTS release, (some discussion on that was here: #11891).
Indeed. Either:
Right. In the case of SimpleLink, the select() code runs on the the network coprocessor (NWP), so would have no way to unblock if another network interface's event occurred. |
I'm glad there's some lively discussion here. Let me start with unassigning this from myself, as I don't think I can be a driver for this issue. Socket offloading was originally implemented by @GAnthony based on TI's usecase, so its maintenance might be inherited by @vanti. I'm happy to help in any way I can, but again, not drive it (unless assigned to that task by my team lead). As pointed out by @rlubos and @GAnthony, the original idea was to plug offloading beneath sock vtable. (And started to forget about that, will all the Battles of POSIX that we had recently).
Well, there's an alternative. And I humbly follow that alternative, it being: socket offloading is nothing but a temporary workaround, allowing to make a proof of concept port of Zephyr to some networking hardware in quick&dirty manner. However, for sustainable support, vendors should provide a way to integrate their hardware at most on L2 (i.e., packet) level, and let Zephyr networking stack to do the actual networking. Because otherwise house-of-cardness of such a solution will always pop up, e.g.:
There're no packets on socket level, so no "packet routing" to be done. Any "offloaded sockets" will be disjoint, with only "routing" possible is on application and application protocol level. |
@rlubos can this be closed now? |
@carlescufi I believe so, yes. |
Is your feature request related to a problem? Please describe.
Fix Zephyr to allow for several devices to be configured as NET_SOCKET_OFFLOAD.
Describe the solution you'd like
I haven't thought too much about the solution, but it would probably involve the offloaded drivers allocating file descriptors using vtables, so that packets can be routed between 2 different offloaded drivers appropriately.
Describe alternatives you've considered
No alternatives.
Additional context
If we allow for more than 1 device to use the socket offload feature, then we can open up more options for Zephyr devices such as Wifi NCP combined with a modem as a wireless gateway, etc.
The text was updated successfully, but these errors were encountered: