[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190620015732.7650f506@redhat.com>
Date: Thu, 20 Jun 2019 01:57:32 +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 v5 5/6] ipv6: Dump route exceptions if requested
On Tue, 18 Jun 2019 09:19:53 -0600
David Ahern <dsahern@...il.com> wrote:
> On 6/18/19 7:20 AM, Stefano Brivio wrote:
> > diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> > index 0f60eb3a2873..7375f3b7d310 100644
> > --- a/net/ipv6/route.c
> > +++ b/net/ipv6/route.c
> > @@ -4854,33 +4854,94 @@ static bool fib6_info_uses_dev(const struct fib6_info *f6i,
> > return false;
> > }
> >
> > -int rt6_dump_route(struct fib6_info *rt, void *p_arg)
> > +/* Return -1 if done with node, number of handled routes on partial dump */
> > +int rt6_dump_route(struct fib6_info *rt, void *p_arg, unsigned int skip)
>
> Changing the return code of rt6_dump_route should be a separate patch.
I guess the purpose would be to highlight how existing cases are
changed, but that looks rather trivial to me. Anyway, changed in v6.
> > + if (filter->dump_routes) {
> > + if (skip) {
> > + skip--;
> > + } else {
> > + if (rt6_fill_node(net, arg->skb, rt, NULL, NULL, NULL,
> > + 0, RTM_NEWROUTE,
> > + NETLINK_CB(arg->cb->skb).portid,
> > + arg->cb->nlh->nlmsg_seq, flags)) {
> > + return 0;
> > + }
> > + count++;
> > + }
> > + }
> > +
> > + if (!filter->dump_exceptions)
> > + return -1;
> > +
>
> And the dump of the exception bucket should be a standalone function.
> You will see why with net-next (it is per fib6_nh).
Sure, no way around it now, changed in v6.
--
Stefano
Powered by blists - more mailing lists