From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next v1 3/5] ipv4: enable IFA_IF_NETNSID for RTM_GETADDR Date: Tue, 4 Sep 2018 10:27:51 -0600 Message-ID: <8f0aa154-1ba9-5659-cbe3-19da4196fae0@gmail.com> References: <20180903043717.20136-1-christian@brauner.io> <20180903043717.20136-4-christian@brauner.io> <20180904085006.58c665c0@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Christian Brauner , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, pombredanne@nexb.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, fw@strlen.de, ktkhai@virtuozzo.com, lucien.xin@gmail.com, jakub.kicinski@netronome.com, nicolas.dichtel@6wind.com To: Jiri Benc Return-path: In-Reply-To: <20180904085006.58c665c0@redhat.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 9/4/18 12:50 AM, Jiri Benc wrote: > > This is a general problem with netlink: unknown attributes are ignored. > We need a way to detect that certain attribute was understood by the > kernel or was not. And it needs to work retroactively, i.e. the > application has to be able to determine the currently running kernel > does not support the feature (because it's too old). sure, and that has been discussed before. > > That's why we return back the attribute in responses to a request with > IFLA_IF_NETNSID present and why we should do the same for > IFA_IF_NETNSID. > >> See 21fdd092acc7e. I would like to see other filters added for addresses >> in the same release this gets used. The only one that comes to mind for >> addresses is to only return addresses for devices with master device >> index N (same intent as 21fdd092acc7e for neighbors). > > I also question the statement that IFA_F_NETNSID is a filter: my > understanding of "filter" is something that limits the output to a > certain subset. I.e., unfiltered results always contain everything that > is in a filtered result. While with IFA_F_NETNSID, we get a completely > different set of data. Does that really constitute a filter? Note that > we can still filter in the target netns. > I'll buy that argument over the 'too coarse' one. Looking at the link version of this flag, the NLM_F_DUMP_FILTERED flag is not used there so for consistency the address one should follow suit.