From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933099AbeAXKxU (ORCPT ); Wed, 24 Jan 2018 05:53:20 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36855 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932953AbeAXKxS (ORCPT ); Wed, 24 Jan 2018 05:53:18 -0500 X-Google-Smtp-Source: AH8x224s4zDIbI5R3WL2jkrvHDzBszzVcZdaw/qed6/wo/EY6aGUq1C10DTC9UFW+qLkqJBYle5LIQ== Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd References: <20180118202124.21616-1-christian.brauner@ubuntu.com> <20180118202124.21616-2-christian.brauner@ubuntu.com> <20180118212914.74878b82@redhat.com> <20180118205552.jm7shzcojbumax2k@gmail.com> <20180122220046.7b65a98a@redhat.com> <20180122212353.7n6lrruqedfhrwux@gmail.com> <20180122230616.0c457f55@redhat.com> <20180123180813.07108d1f@redhat.com> To: Jiri Benc Cc: Christian Brauner , Christian Brauner , davem@davemloft.net, dsahern@gmail.com, fw@strlen.de, daniel@iogearbox.net, lucien.xin@gmail.com, mschiffer@universe-factory.net, jakub.kicinski@netronome.com, vyasevich@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stephen@networkplumber.org From: Nicolas Dichtel Organization: 6WIND Message-ID: <9b298ec7-4955-2644-7491-e68c4449a6c0@6wind.com> Date: Wed, 24 Jan 2018 11:53:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180123180813.07108d1f@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 23/01/2018 à 18:08, Jiri Benc a écrit : > On Tue, 23 Jan 2018 17:37:11 +0100, Nicolas Dichtel wrote: >> When a virtual interface moves to another netns, the netlink RTM_DELLINK message >> contains the attribute IFLA_NEW_NETNSID, which identifies where the interface >> moves. The nsid may be allocated if needed. > > The problem is that ifindex may change and it's not announced. The only > way is to track both ifindex and ifname, watch for the ifname to appear > in the target netns and update the application's view of ifindex. Yes, you're right. > > It would be much better if the whole (ifindex, netnsid) pair was > returned. I think it could be added. Sure. Do you plan to send a patch? > >> I don't know if it's acceptable to also allocate an nsid in case of a physical >> interface. > > I think we need that. If you agree, I can send a patch to remove this limitation. Regards, Nicolas