Re: [Linux-vrf-general] [PATCH 6/6] netns: configurable number of initial network namespaces
Status: Beta
Brought to you by:
jleu
From: <ebi...@xm...> - 2008-10-30 22:44:59
|
Patrick McHardy <ka...@tr...> writes: > Vivien Chappelier wrote: >> Yes; the linux-vrf patches had a new netlink message to create/remove the >> equivalent of a network namespace (ip vrf add 1). I've not ported this feature >> yet, so this patch is meant to provide another way of setting up networking >> stacks without the need for a new process for each stack. The ability to >> dynamically create/remove networking stacks from userspace would definitely be >> useful. > > I see, I didn't realize the process that created a namespace > needs to be kept running. So yes, creating standalone network > namespaces seems to make sense To be clear a reference needs to be kept to the network namespace. Either by being the network namespace that new sockets are created in task->nsproxy->netns or the network namespace of an open socket sock_net(sk). If neither of those two conditions hold the network namespace count drops to zero and it will be freed. Probably not ideal if you are just doing routing. Eric |