Received: by 10.223.176.46 with SMTP id f43csp4382596wra; Tue, 23 Jan 2018 08:38:06 -0800 (PST) X-Google-Smtp-Source: AH8x226oWspF+97tUer9vwudBiDA7EqpeauIZhRlyGgxuqrjJbbx2J4Qfy+y7xR84UNc+33DwmuU X-Received: by 10.36.82.71 with SMTP id d68mr4485646itb.142.1516725485913; Tue, 23 Jan 2018 08:38:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516725485; cv=none; d=google.com; s=arc-20160816; b=gWEjElO9cKqKHkzxaorYAGljJpODe905UPLrXU6SelMGwYGwLaDwXIoiMGZ2xDMAE6 flV7ot7p/9trjIZsZ+EYY+LQsQgo6XMk9Dcoprzpo9dMdJQeZu+/kiXS21w+g2v8GvJd /fNkvYgiZ262gdhMTtaLb0Fw5eTAV4QX81DoI70PcgRhKv/By1FzjwP0y3Hs9ZmCSUJn BHCLVlm7/TL0zzAZSyPUAMlWaaWs/yE7pL68+6t/Cr8Fp0Hyi7CSWBdoP+zjGukzRF// mtwsLVJ+BO0FygIETbYEZvVYqtvvEU88xhy64BJ8e4qPG1Nr2KSBdnyCUuG+STBEVLJG IdRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:cc:to:references:subject:reply-to :dkim-signature:arc-authentication-results; bh=IT13Stvx2XzgJQtZ9sVIlqwKEEPWKo4W4XkfkQhYmP0=; b=lI0jHltmIItHcmLPtfGELwb7wk3kXQNreFk7a+t0rQyoUViSBJ/htQkOlnpHrdilht +aY49c9pTHSeLwKa9WQSd2yx2dI9k25SQewUIWU79hvNVcrh120xDfJY1H17jrLFSWak ZQGx+3bSMx0+T4oLZnBHkJjrU1dE8Ihhy4MpV03tGilb870u7uERhjakxqn4Sj9M0Q8J E55WsQ+uAXeJ9hsWS9cNV2LUkkv7shbN64NsCADKEFcQ9roAdj+5IaVdVVErde3vlhs6 o2/CXdanmy7dYL4xomYCyDEyqee9gq1pMOogt6AMnKpqymrxz7/L03k/+EzX6apmij0A nH9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@6wind-com.20150623.gappssmtp.com header.s=20150623 header.b=MsUNuHPU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e187si15327174ioa.5.2018.01.23.08.37.52; Tue, 23 Jan 2018 08:38:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@6wind-com.20150623.gappssmtp.com header.s=20150623 header.b=MsUNuHPU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751456AbeAWQhY (ORCPT + 99 others); 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 Received: by mail-wr0-f178.google.com with SMTP id t16so1228396wrc.10 for ; Tue, 23 Jan 2018 08:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=reply-to:subject:references:to:cc:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IT13Stvx2XzgJQtZ9sVIlqwKEEPWKo4W4XkfkQhYmP0=; b=MsUNuHPUKf7NCG8z/DN15GKZHTHD+ABBJkK3+EX9qeblAk9PsVoIXqZ+vkK6aNqbuT nzroSUo89gt+8hqlYx1sBs0xACVWYVs+upg75FIBpT40tDacsOguxldmbDt3LIAflyGZ 0p7JQGq/CZWlfwsWQTZwHEAw+rLR4OXC8BRuFdsB/+OcktBauvgiy9G+6gWn/5PZP5wf ZOSt5uv09JeWRIy2bygm/sUgQpIsuhG+2GjGQUYvS3EfKLO5doutGE4+5IXxhk6AqMPd S9mMgE0gei787Gy+Xt8msRZuCd7PEP2uCmPBf34CfCUd4BgpIKWdgePmBjO7UUXFnCK0 fBxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:references:to:cc:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=IT13Stvx2XzgJQtZ9sVIlqwKEEPWKo4W4XkfkQhYmP0=; b=VN1ESQ/u7n8t+06UUgftsmLkzGYNZa1iZke4ZBT4Iav0kx5E6HbXnMOHEd50JrSnnS ZyMurdeV1UOwtv7rsM/u8lXTqpCm/YDI/fNum4G+0MYdiVhREaVgcG6eD6yrkHWXDFsY KdYB3nMpm+5CjHR4RSqITXo6p/dgMMZhwyG91diUhGzSf5ix1dET/oPQ/5+7KPJmLF5q BjAcmrbZiZ3lOzvZRVCHrQv7ozQEup0WmzDTX/viPUSec7YClyBhEh1VuB9PE/PD0PEw xLHUxZNYnbLKU7ybzcdVzRB/2T5fAXhAqGnzYeA9Szpbf8ebTbADUBY4Vd/Qe9MeM1Wl YMmg== X-Gm-Message-State: AKwxytc6wxzV61QGpze8EbUfOeCoyIBSQSo5jQZfAxtSs1SAWPZwvDKa 6LyCD1sXNNPk0Ensss9xS76Psg== X-Received: by 10.223.170.208 with SMTP id i16mr3014742wrc.90.1516725440082; Tue, 23 Jan 2018 08:37:20 -0800 (PST) Received: from ?IPv6:2a01:e35:8b63:dc30:c358:2e43:4ca8:894a? ([2a01:e35:8b63:dc30:c358:2e43:4ca8:894a]) by smtp.gmail.com with ESMTPSA id s2sm5830552wmf.0.2018.01.23.08.37.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jan 2018 08:37:19 -0800 (PST) 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 Precedence: bulk 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