[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190610234502.41949c97@redhat.com>
Date: Mon, 10 Jun 2019 23:45:02 +0200
From: Stefano Brivio <sbrivio@...hat.com>
To: David Ahern <dsahern@...il.com>
Cc: David Miller <davem@...emloft.net>, Jianlin Shi <jishi@...hat.com>,
Wei Wang <weiwan@...gle.com>, Martin KaFai Lau <kafai@...com>,
Eric Dumazet <edumazet@...gle.com>,
Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH net v3 1/2] ipv6: Dump route exceptions too in
rt6_dump_route()
On Mon, 10 Jun 2019 15:31:37 -0600
David Ahern <dsahern@...il.com> wrote:
> On 6/8/19 12:12 PM, Stefano Brivio wrote:
> > To avoid dumping exceptions if not requested, we can, in the future, add
> > support for NLM_F_MATCH as described by RFC 3549. This would also require
> > some changes in iproute2: whenever a 'cache' argument is given,
> > RTM_F_CLONED should be set in the dump request and, when filtering in the
> > kernel is desired, NLM_F_MATCH should be also passed. We can then signal
> > filtering with the NLM_F_DUMP_FILTERED whenever a NLM_F_MATCH flag caused
> > it.
>
> NLM_F_MATCH is set today. iproute2 for example uses NLM_F_DUMP for dump
> requests and NLM_F_DUMP is defined as:
>
> #define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH)
>
> further, the kernel already supports kernel side filtering now for
> routes. See ip_valid_fib_dump_req.
Indeed, we don't have to add much: just make this work for IPv4 too,
honour NLM_F_MATCH, and skip filtering (further optimisation) on
NLM_F_DUMP_FILTERED in iproute2 (ip neigh already uses that).
--
Stefano
Powered by blists - more mailing lists