From: David Ahern <dsahern@gmail.com>
To: Nikolay Aleksandrov <razor@blackwall.org>, netdev@vger.kernel.org
Cc: idosch@idosch.org, davem@davemloft.net, kuba@kernel.org,
Nikolay Aleksandrov <nikolay@nvidia.com>
Subject: Re: [PATCH net v2 1/3] net: ipv6: add fib6_nh_release_dsts stub
Date: Sun, 28 Nov 2021 12:21:40 -0700 [thread overview]
Message-ID: <28dd7421-15f3-db72-4e1e-3d86fa2129d7@gmail.com> (raw)
In-Reply-To: <20211122151514.2813935-2-razor@blackwall.org>
On 11/22/21 8:15 AM, Nikolay Aleksandrov wrote:
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 3ae25b8ffbd6..42d60c76d30a 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -3680,6 +3680,25 @@ void fib6_nh_release(struct fib6_nh *fib6_nh)
> fib_nh_common_release(&fib6_nh->nh_common);
> }
>
> +void fib6_nh_release_dsts(struct fib6_nh *fib6_nh)
> +{
> + int cpu;
> +
> + if (!fib6_nh->rt6i_pcpu)
> + return;
> +
> + for_each_possible_cpu(cpu) {
> + struct rt6_info *pcpu_rt, **ppcpu_rt;
> +
> + ppcpu_rt = per_cpu_ptr(fib6_nh->rt6i_pcpu, cpu);
> + pcpu_rt = xchg(ppcpu_rt, NULL);
> + if (pcpu_rt) {
> + dst_dev_put(&pcpu_rt->dst);
> + dst_release(&pcpu_rt->dst);
> + }
> + }
> +}
> +
this duplicates fib6_nh_release. Can you send a follow on to have it use
this new function?
next prev parent reply other threads:[~2021-11-28 19:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 15:15 [PATCH net v2 0/3] net: nexthop: fix refcount issues when replacing groups Nikolay Aleksandrov
2021-11-22 15:15 ` [PATCH net v2 1/3] net: ipv6: add fib6_nh_release_dsts stub Nikolay Aleksandrov
2021-11-28 19:21 ` David Ahern [this message]
2021-11-28 20:14 ` Nikolay Aleksandrov
2021-11-28 21:35 ` David Ahern
2021-11-22 15:15 ` [PATCH net v2 2/3] net: nexthop: release IPv6 per-cpu dsts when replacing a nexthop group Nikolay Aleksandrov
2021-11-22 15:15 ` [PATCH net v2 3/3] selftests: net: fib_nexthops: add test for group refcount imbalance bug Nikolay Aleksandrov
2021-11-22 16:00 ` [PATCH net v2 0/3] net: nexthop: fix refcount issues when replacing groups patchwork-bot+netdevbpf
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=28dd7421-15f3-db72-4e1e-3d86fa2129d7@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=idosch@idosch.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=razor@blackwall.org \
/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).