From mboxrd@z Thu Jan 1 00:00:00 1970 From: jamal Subject: Re: [PATCH 7/8] net: Allow setting the network namespace by fd Date: Fri, 24 Sep 2010 07:51:24 -0400 Message-ID: <1285329084.13976.661.camel@bigi> References: <1285240926.5036.7.camel@bigi> <20100923145856.GB1160234@jupiter.n2.diac24.net> Reply-To: hadi@cyberus.ca Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100923145856.GB1160234@jupiter.n2.diac24.net> Sender: netfilter-devel-owner@vger.kernel.org To: David Lamparter Cc: "Eric W. Biederman" , linux-kernel@vger.kernel.org, Linux Containers , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Daniel Lezcano , Linus Torvalds , Michael Kerrisk , Ulrich Drepper , Al Viro , David Miller , "Serge E. Hallyn" , Pavel Emelyanov , Pavel Emelyanov , Ben Greear , Matt Helsley , Jonathan Corbet , Sukadev Bhattiprolu , Jan Engelhardt , Patrick McHardy List-Id: containers.vger.kernel.org On Thu, 2010-09-23 at 16:58 +0200, David Lamparter wrote: > migrating route table entries makes no sense because > a) they refer to devices and configuration that does not exist in the > target namespace; they only make sense within their netns context > b) they are purely virtual and you get the same result from deleting and > recreating them. > > Network devices are special because they may have something attached to > them, be it hardware or some daemon. Routes functionally reside on top of netdevices, point to nexthop neighbors across these netdevices etc. Underlying assumption is you take care of that dependency when migrating. We are talking about FIB entries here not the route cache; moving a few pointers within the kernel is a hell lot faster than recreating a subset of BGP entries from user space. Eric, I didnt follow the exposed-races arguement: Why would it involve more than just some basic locking only while you change the struct net pointer to the new namespace for these sub-subsystems? cheers, jamal