All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: thinker.li@gmail.com, netdev@vger.kernel.org, ast@kernel.org,
	martin.lau@linux.dev, kernel-team@meta.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	liuhangbin@gmail.com
Cc: sinquersw@gmail.com, kuifeng@meta.com
Subject: Re: [PATCH net-next v3 3/5] net/ipv6: Remove expired routes with a separated list of routes.
Date: Mon, 5 Feb 2024 08:24:31 -0700	[thread overview]
Message-ID: <6e659e99-97dd-474d-9706-76ae44dd921a@kernel.org> (raw)
In-Reply-To: <2ddfe75a-45e4-4499-8aae-4d83de90d1ce@kernel.org>

On 2/4/24 9:45 PM, David Ahern wrote:
>> @@ -1264,8 +1265,18 @@ cleanup_prefix_route(struct inet6_ifaddr *ifp, unsigned long expires,
>>  		if (del_rt)
>>  			ip6_del_rt(dev_net(ifp->idev->dev), f6i, false);
>>  		else {
>> -			if (!(f6i->fib6_flags & RTF_EXPIRES))
>> +			if (!(f6i->fib6_flags & RTF_EXPIRES)) {
>> +				table = f6i->fib6_table;
>> +				spin_lock_bh(&table->tb6_lock);
>>  				fib6_set_expires(f6i, expires);
>> +				/* If fib6_node is null, the f6i is just
>> +				 * removed from the table.
>> +				 */
>> +				if (rcu_dereference_protected(f6i->fib6_node,
> 
> ... meaning this check should not be needed

reviewing this patch again this morning, and yes, I believe this check
is needed here and other places. Given that all of the instances check
if the route entry is still in the table, it should be consolidated into
fb6_add_gc_list.

> 
>> +							      lockdep_is_held(&table->tb6_lock)))
>> +					fib6_add_gc_list(f6i);
>> +				spin_unlock_bh(&table->tb6_lock);
>> +			}
>>  			fib6_info_release(f6i);
>>  		}
>>  	}


  reply	other threads:[~2024-02-05 15:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02  8:21 [PATCH net-next v3 0/5] Remove expired routes with a separated list of routes thinker.li
2024-02-02  8:21 ` [PATCH net-next v3 1/5] net/ipv6: set expires in rt6_add_dflt_router() thinker.li
2024-02-02 11:52   ` Hangbin Liu
2024-02-05  4:42   ` David Ahern
2024-02-02  8:21 ` [PATCH net-next v3 2/5] net/ipv6: Remove unnecessary clean thinker.li
2024-02-05  4:42   ` David Ahern
2024-02-02  8:21 ` [PATCH net-next v3 3/5] net/ipv6: Remove expired routes with a separated list of routes thinker.li
2024-02-04 10:29   ` Hangbin Liu
2024-02-04 16:10     ` David Ahern
2024-02-05  4:45   ` David Ahern
2024-02-05 15:24     ` David Ahern [this message]
2024-02-02  8:21 ` [PATCH net-next v3 4/5] net/ipv6: set expires in modify_prefix_route() if RTF_EXPIRES is set thinker.li
2024-02-02 12:16   ` Hangbin Liu
2024-02-02 17:57     ` Kui-Feng Lee
2024-02-04 10:17       ` Hangbin Liu
2024-02-05 18:59         ` Kui-Feng Lee
2024-02-02  8:22 ` [PATCH net-next v3 5/5] selftests/net: Adding test cases of replacing routes and route advertisements thinker.li
2024-02-02 12:37   ` Hangbin Liu

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=6e659e99-97dd-474d-9706-76ae44dd921a@kernel.org \
    --to=dsahern@kernel.org \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=kuifeng@meta.com \
    --cc=liuhangbin@gmail.com \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sinquersw@gmail.com \
    --cc=thinker.li@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.