From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Denis V. Lunev" Subject: Re: [patch 2/2][NETNS45][V3] remove timewait sockets at cleanup Date: Fri, 28 Sep 2007 14:06:23 +0400 Message-ID: <46FCD21F.7020006@sw.ru> References: <20070928095108.455904100@mai.toulouse-stg.fr.ibm.com> <20070928095348.625343106@mai.toulouse-stg.fr.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070928095348.625343106-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Daniel Lezcano Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org List-Id: containers.vger.kernel.org Daniel Lezcano wrote: > From: Daniel Lezcano > > Denis Lunev spotted that if we take a reference to the network namespace > with the timewait sockets, we will need to wait for their expiration to > have the network namespace freed. This is a waste of time, the timewait > sockets are for avoiding to receive a duplicate packet from the network, > if the network namespace is freed, the network stack is removed, so no > chance to receive any packets from the outside world. > > This patchset remove/destroy the timewait sockets when the > network namespace is freed. > > The exit method registered by netns_register_subsys is put in the tcp.c > file and not in inet_timewait_sock.c. The reasons are we browse the tcp > established hash table and I don't want to add references to tcp in inet > timewait sockets and, furthermore, dccp protocol uses the inet timewait > sock too. IMHO, if we status to cleanup dccp timewait too, we should add > a exit method in dccp file. > > Signed-off-by: Daniel Lezcano Signed-off-by: Denis V. Lunev