Received: by 10.223.176.46 with SMTP id f43csp2799742wra; Thu, 25 Jan 2018 15:35:43 -0800 (PST) X-Google-Smtp-Source: AH8x227CT1VMTbca61DJ6pnNfC9B3EPG9pVCBQ5BihJhYNFkGJcXapja2GT+5fjmKJgg0RPvT0wH X-Received: by 2002:a17:902:622:: with SMTP id 31-v6mr12610929plg.448.1516923343030; Thu, 25 Jan 2018 15:35:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516923343; cv=none; d=google.com; s=arc-20160816; b=cUrYVv/kfn7WuAkQmctYIxdIDEi4WTTkDrJtueGYgKaH1ALZG1mXJDY80Xejfd2n6y FaaqcSZy4N0IBQhA3iFO0JzzYCb2luYxelNh4xfrKJai7fQbePxFUB5t1Xya5AR95B0d iIXsx9NHSCNtOy/8LKwpVt0KSJK5chbLfyB11DFCOrsJSYWF13KTa788jP78YfRVqM2w 2Je+6Zq3mL83DMSw4GEjaT83xXeHRBh122g7ymr12MnopSrT7JXsanyf37Spif2KvmLJ BmfIeuHb1pOBzuzIBIZZsupxeILstCZgbF97nHT1Pu7iMjgw2aahK2rva5BzmxAA9ttm eZ9A== 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=4D1hRZMkv8iXIoEWDbSfAgRB/BGYUQHWbEsecW43gWY=; b=Vh+kLO8sCkWd5yKU+7wLhNITTsFTe+OQ05Kn0181/9j+AyG1G2oaNZW75Q013Bxepm AZNgdJU28DNAWYkay+PzlYkgEuf3ekXxrZyKWG2osV8g9AOtp1YPpyJl0OBodta9s0s8 PdJG76X9rwpQ2P+kY0+xrbXSdGh9ZN7y8pTmevIRksm3WiTzdu0Mh08VcSQm9hCYgqI0 Cp3qiCNgfv1AgQDCzdTZ4b7812DSY1gNdC6AcvtbCf1gs7LYtKWotaNmxkFcPpazt+Y7 l6GEeQPzDMVIgNz1I7v4rUCypTcVld4Jdn7CIJidQrwBCk69cNSOlM1OunhCEzj7g1PA Z1og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@6wind-com.20150623.gappssmtp.com header.s=20150623 header.b=NpGIX0ee; 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 p8si2154579pgn.769.2018.01.25.15.35.26; Thu, 25 Jan 2018 15:35:42 -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=NpGIX0ee; 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 S1751426AbeAYXe5 (ORCPT + 99 others); Thu, 25 Jan 2018 18:34:57 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:42516 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbeAYXez (ORCPT ); Thu, 25 Jan 2018 18:34:55 -0500 Received: by mail-wm0-f53.google.com with SMTP id r71so17905235wmd.1 for ; Thu, 25 Jan 2018 15:34:54 -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=4D1hRZMkv8iXIoEWDbSfAgRB/BGYUQHWbEsecW43gWY=; b=NpGIX0eeDoP6e4VMdJlQhQcky/jCGYWk8Efqi7TgfxNWNaQ/YUeKk2IJxJqk5KRsGU plgF5OrSyeEt4ehHfdkljr4XB9cKh+AuBInPDG5vBu6qKYY4IvEHJ3Bw9iN5MAuhogTJ 32tIeTu2ypwAbdOGzJbRdXSIFvV0htDJo/2ROoUcSYu390KHA7LtaUk2LykP9mQGL6+p E4FKftJE71ySLTsYe2HIDXrnXp1cpi2OTrxssV61/YQXjaczuVu9nxIUJHa0APAm76NY bGi88/01b9Npl80VLg18ron/vst+Rtwiz6ijTQpj/k39dXC5GjWnvW2j+fSU04g9WntM rKzA== 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=4D1hRZMkv8iXIoEWDbSfAgRB/BGYUQHWbEsecW43gWY=; b=LVg8QGkS3St3IVqzuWLOD8iw6VaPgcMwIr5QayinaTHWBpz3nGstjy1XnzHGFZvu0r 9fBrsSmAWyABhfb55q3YhEt0/Abrcr7bR9oJt2dSerxxkvVeFN2CS79kB1qqGX/59chP TBkMS0V7iTkJx+DXQ9yF6VJ7pmNn9RccKb1rZM9UaNJSq4Z00wfPr8E+ihC86nivq063 7iYaYhB517DzpFmzz0NhUMN9QsnQSsXRyfDbWIMJb6/fcyStUors/4FJM3FFyOIticdo iUDZhWsEb77yPXcvuKS6WSSWTvSeaN5XFT5/IQmHW0qWsH7JNWInk5wk1cb6al7UGNsp jGfg== X-Gm-Message-State: AKwxytdQlJ5MjiFd1pyAiQ9Je4O08A8M9P1wSdR+dfKnVmkH4TIjwtId WDnvUBkB0uDGmjIL70DN2zVLVQ== X-Received: by 10.28.23.14 with SMTP id 14mr9397601wmx.5.1516923293591; Thu, 25 Jan 2018 15:34:53 -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 e22sm11880547wre.55.2018.01.25.15.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 15:34:52 -0800 (PST) Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH net-next 0/3 V1] rtnetlink: enable IFLA_IF_NETNSID for RTM_{DEL,SET}LINK References: <20180124142634.17766-1-christian.brauner@ubuntu.com> <20180124173515.5ae2bc05@redhat.com> <20180125233043.66ff08c2@redhat.com> To: Jiri Benc Cc: Christian Brauner , netdev@vger.kernel.org, ebiederm@xmission.com, 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, linux-kernel@vger.kernel.org, w.bumiller@proxmox.com, Christian Brauner From: Nicolas Dichtel Organization: 6WIND Message-ID: <3b916ec7-3aca-13a7-7a48-7a7e8822e488@6wind.com> Date: Fri, 26 Jan 2018 00:34:51 +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: <20180125233043.66ff08c2@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 25/01/2018 à 23:30, Jiri Benc a écrit : > On Thu, 25 Jan 2018 15:20:59 +0100, Nicolas Dichtel wrote: >> Hmm, I don't agree. For me, it would be the correct answer. If user has a socket >> in ns_a and targets a RTM_GETLINK in ns_b, the answer he gets should be like if >> it was done in ns_b. > > But that information would be useless for the caller. Why return a > value that has no meaning for the caller and can not be used? More so > when the kernel is aware of what the correct meaningful value is? Why meaningful? The user knows that the answer is like if if was done in another netns. It enables to have only one netlink socket instead of one per netns. But the code using it will be the same. I fear that with your approach, it will results to a lot of complexity in the kernel. > >> This is already the case with messages received with NETLINK_LISTEN_ALL_NSID, >> there is no reason to do something different. > > NETLINK_LISTEN_ALL_NSID is tough due to way it is implemented. But yes, > it should translate the netnsids to be valid in the socket's netns. > That's the only sane way for the listener. A listener that uses this option should know the details about each netns it listens. Thus, he has no problem to interpret the answer. What is really missing for me, is a way to get a fd from an nsid. The user should be able to call RTM_GETNSID with an fd and a nsid and the kernel performs the needed operations so that the fd points to the corresponding netns. Nicolas