On Wed, 2015-07-29 at 15:16 +0200, Nicolas Dichtel wrote: > This patch takes advantage of the newly added lwtunnel framework to > allow the user to set routes that point to a peer netns. > > Packets are injected to the peer netns via the loopback device. It works > only when the output device is 'lo'. > > Example: > ip route add 40.1.1.1/32 encap netns nsid 5 via dev lo > > The goal is to be scalable when the number of netns is high (10k or more). > Which this patch, we can save two interfaces (veth) per netns, which helps > to to reduce memory consumption and the time needed to create a netns.
Really this is a hack Nicolas. get_net_ns_by_id() was not meant to be used in data (fast ???) path. Same for get_net() and put_net() Plumbing like that should not happen in lo start_xmit() -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html