-
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
BSD socket offload with IPv4 and IPv6 disabled breaks many client-based net samples #18105
Comments
also adding @rlubos |
Could you elaborate this a bit more? At least compilation seems to work just fine if I disable IPv4 and IPv6. What kind of issues there are in runtime (I do not have any offloaded devices that I could try myself)?. What I did to test the compilation:
|
@jukkar You are correct. The server-based samples might work somewhat. However, many of the client-based samples all use logic like this in echo_client/tcp.c::start_tcp(): All functions of tcp are wrapped with Or the coap_client: (Fixes title of the issue to be more specific) |
Indeed, that is unfortunate. One option could be to change the
Edit: hmm, just realized that offloading does not mean that IPv6 is enabled so the above check would need more tweaking. |
After some thinking, I think we need to leave the |
I've used I think that Jukka got the point here, that we'd need a new Kconfig (perhaps something like |
I created a PR that allows user to disable native IP stack. It is only build tested as I do not have proper hw to test it. |
NOTE TO BE INCLUDED IN THIS FIX A proper solution needs to be implemented: as in we might force offloaded drivers to define which IP versions they support. With the addition of NET_NATIVE this wouldn't add the internal stack-based code, but would allow subsystems to still use this information in an intelligent way. |
Allow user to disable native IP stack and use offloaded IP stack instead. It is also possible to enable both at the same time if needed. Fixes zephyrproject-rtos#18105 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow user to disable native IP stack and use offloaded IP stack instead. It is also possible to enable both at the same time if needed. Fixes #18105 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Is your feature request related to a problem? Please describe.
When using the socket offload API where IPv4 and IPv6 are disabled, all net samples are broken due to their dependence on
NET_CONFIG_*
settings.Describe the solution you'd like
In a perfect world, samples would still work -- the main issue being where to get things like peer server address.
Describe alternatives you've considered
Just starting the discussion. I haven't explored alternatives yet.
Additional context
Devices like TI's SimpleLink Wifi and the upcoming modem context changes allow for them to be used without the majority of the Zephyr IP stack -- instead offloading the IP stack onto the NCP via the
NET_SOCKETS_OFFLOAD
config.This saves quite a lot of flash and processing when combined with
CONFIG_IPV4=n
andCONFIG_IPV6=n
, but means the user has to customize each networking sample.The text was updated successfully, but these errors were encountered: