From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751477AbeAWQhY (ORCPT ); Tue, 23 Jan 2018 11:37:24 -0500 Received: from mail-wr0-f178.google.com ([209.85.128.178]:44009 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751325AbeAWQhV (ORCPT ); Tue, 23 Jan 2018 11:37:21 -0500 X-Google-Smtp-Source: AH8x2263F5wvEWsCT5lWYJ0Ni+xE9zHZSdcQXA1fOKuxBmXC0s1tnw8kWvrtfsfKiNcymiC21dWlfQ== 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> To: Jiri Benc , Christian Brauner Cc: 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: Date: Tue, 23 Jan 2018 17:37: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: <20180122230616.0c457f55@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 22/01/2018 à 23:06, Jiri Benc a écrit : [snip] > Btw, we have one missing piece here: when an interface is moved to a > name space that does not have netnsid attached, we want to find out > where the interface was moved to. But there's currently no reliable way > to do it. For veth, the other end can be used to get the netnsid (note > that RTM_GETLINK will return the correct link netnsid even when the > queried veth interface is in a different name space), for openvswitch, > we can now use genetlink, etc., but using different ways for different > interface types is not the best API ever and for standalone interfaces > we have nothing. I'd like to see something added to uAPI to cover this > in a generic way. 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. I don't know if it's acceptable to also allocate an nsid in case of a physical interface. Regards, Nicolas