From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Benc Subject: Re: [PATCH RFC v2 net-next 02/25] net/ipv6: Refactor address dump to push inet6_fill_args to in6_dump_addrs Date: Tue, 2 Oct 2018 12:54:25 +0200 Message-ID: <20181002125425.35e96876@redhat.com> References: <20181002002851.5002-1-dsahern@kernel.org> <20181002002851.5002-3-dsahern@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net, christian@brauner.io, stephen@networkplumber.org, David Ahern To: David Ahern Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34558 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726989AbeJBRhJ (ORCPT ); Tue, 2 Oct 2018 13:37:09 -0400 In-Reply-To: <20181002002851.5002-3-dsahern@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 1 Oct 2018 17:28:28 -0700, David Ahern wrote: > Pull the inet6_fill_args arg up to in6_dump_addrs and move netnsid > into it. Since IFA_TARGET_NETNSID is a kernel side filter add the > NLM_F_DUMP_FILTERED flag so userspace knows the request was honored. IFA_TARGET_NETNSID is not a filter. "Filter" returns a subset of the results. It's kind of optimization when one is interested only in some data but not all of them. Instead of dumping everything, going through the results and picking only the data one is interested in, it's better to pass a filter and get only the relevant data. But you're not really required to: you can filter in your app. By contrast, IFA_TARGET_NETNSID returns a completely different set of data. It's impossible to not set it and filter the results in your app. As the consequence, IFA_TARGET_NETNSID must not set NLM_F_DUMP_FILTERED (if not complemented by a real filter). I understand that you want to differentiate between data dumped without and with IFA_TARGET_NETNSID present. But we already have that: the IFA_TARGET_NETNSID attribute is returned back in the latter case. Nacked-by: Jiri Benc Jiri