From: Stefano Brivio <sbrivio@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Jianlin Shi <jishi@redhat.com>, Wei Wang <weiwan@google.com>,
Martin KaFai Lau <kafai@fb.com>,
Eric Dumazet <edumazet@google.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net v5 5/6] ipv6: Dump route exceptions if requested
Date: Thu, 20 Jun 2019 01:57:32 +0200 [thread overview]
Message-ID: <20190620015732.7650f506@redhat.com> (raw)
In-Reply-To: <333b0a08-07dd-3c70-1268-2d9eb5646564@gmail.com>
On Tue, 18 Jun 2019 09:19:53 -0600
David Ahern <dsahern@gmail.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
next prev parent reply other threads:[~2019-06-19 23:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 13:20 [PATCH net v5 0/6] Fix listing (IPv4, IPv6) and flushing (IPv6) of cached route exceptions Stefano Brivio
2019-06-18 13:20 ` [PATCH net v5 1/6] fib_frontend, ip6_fib: Select routes or exceptions dump from RTM_F_CLONED Stefano Brivio
2019-06-18 14:49 ` David Ahern
2019-06-18 13:20 ` [PATCH net v5 2/6] ipv4/fib_frontend: Allow RTM_F_CLONED flag to be used for filtering Stefano Brivio
2019-06-18 14:49 ` David Ahern
2019-06-18 13:20 ` [PATCH net v5 3/6] ipv4: Dump route exceptions if requested Stefano Brivio
2019-06-18 14:48 ` David Ahern
2019-06-19 23:57 ` Stefano Brivio
2019-06-18 13:20 ` [PATCH net v5 4/6] Revert "net/ipv6: Bail early if user only wants cloned entries" Stefano Brivio
2019-06-18 14:51 ` David Ahern
2019-06-18 13:20 ` [PATCH net v5 5/6] ipv6: Dump route exceptions if requested Stefano Brivio
2019-06-18 15:19 ` David Ahern
2019-06-19 23:57 ` Stefano Brivio [this message]
2019-06-18 13:20 ` [PATCH net v5 6/6] ip6_fib: Don't discard nodes with valid routing information in fib6_locate_1() Stefano Brivio
2019-06-18 14:51 ` [PATCH net v5 0/6] Fix listing (IPv4, IPv6) and flushing (IPv6) of cached route exceptions David Ahern
2019-06-18 16:25 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190620015732.7650f506@redhat.com \
--to=sbrivio@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=jishi@redhat.com \
--cc=kafai@fb.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=netdev@vger.kernel.org \
--cc=weiwan@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).