-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[broadcom]: respect the current network namespace when creating netdev #3896
Conversation
retest vsimage please |
I do not see other netdev drivers have this patch. Do you know if this is a standard behavior in kernel module? |
It depends on the device. https://elixir.bootlin.com/linux/latest/source/drivers/net/tun.c#L2789 ref: list of https://elixir.bootlin.com/linux/latest/ident/dev_net_set This patch won't change the current SONiC behavior since all SONiC containers are running with |
you assume the syncd container will be in the same namespace as swss. it is not always the case. a more generic solution is the create the netdev in global namespace and have a user space daemon to move the netdev to the right namespace. |
Yes, I was assuming putting syncd and swss ( and other daemons that need front panel port access ) in the same netns. I think it's not consistent with other virtual netdev like TUN or veth if we create KNET netdev in a network namespace other than the default and it pops out in the default one. If we need to move it to another namespace, we can do that after creating it. |
we are working on a case a single syncd support multiple asic, in that case, all the netdevs created by syncd will likely not in the same namespace. but I think your have a point. this knet driver is more like a tun/tap device than other traditional netdev. |
Broadcom-Switch/OpenNSL#26
Signed-off-by: Wataru Ishida [email protected]