Skip to content

Make nicer CONFIG_NET_NS=n case code

Pavel Emelyanov netdev 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 15 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5Make the init/exit hooks checks outside the loopnet/core/net_namespace.c+11 -121 reply
2/5Relax the reference counting of init_net_nsinclude/net/net_namespace.h+25 -81 reply
3/5Hide the dead code in the net_namespace.cnet/core/net_namespace.c+68 -631 reply
4/5Mark the setup_net as __net_initnet/core/net_namespace.c+1 -11 reply
5/5Hide the net_ns kmem cachenet/core/net_namespace.c+4 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

Currently we have the NET_NS config option, but the only change it makes is just return ERR_PTR(-EINVAL) inside the cloning call thus introducing a bunch of a dead code and making the reference counting unneeded. This is not very good.

So clean the net_namespace.c to fix this.

I have sent a set of patches to Andrew to make similar thing for other namespaces, which introduces the NAMESPACES option to turn all the namespaces off at once (to make embedded people suffer less). So after that stuff is in, there will be some more patches to tie all this together.

What is to be done after this set is to make the register_pernet_xxx stuff smaller. Currently this code weights approximately 500 bytes, so it worths reducing it, but I haven't found a good solution yet.