All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Roulin <aroulin@nvidia.com>
To: Francesco Ruggeri <fruggeri@arista.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: neighbour netlink notifications delivered in wrong order
Date: Thu, 16 Jun 2022 11:33:11 -0700	[thread overview]
Message-ID: <1e6d685a-66c3-3443-3b35-d7b0d0753a20@nvidia.com> (raw)
In-Reply-To: <CA+HUmGhy1gqH8MjiOqfsq7-sbGnWDzosC334SPR9dQYJZrMY9Q@mail.gmail.com>

On 6/10/22 9:18 AM, Francesco Ruggeri wrote:
> On Thu, Jun 9, 2022 at 9:40 AM Francesco Ruggeri <fruggeri@arista.com> wrote:
>>
>> On Mon, Jun 6, 2022 at 7:07 PM Andy Roulin <aroulin@nvidia.com> wrote:
>>>
>>> Below is the patch I have been using and it has worked for me. I didn't
>>> get a chance yet to test all cases or with net-next but I am planning to
>>> send upstream.
>>
>> Thanks Andy, the patch fixes the reordering that I was seeing in my
>> failure scenario.
> 
> I think that with this patch there may still be a narrower race
> condition, though probably not as bad.
> The patch guarantees that the notification is for the latest state change,
> but not necessarily the change that initiated the notification.
> In this scenario:
> 
> n->nud_state = STALE
> write_unlock_bh(n->lock)
>                         n->nud_state = REACHABLE
>                         write_unlock_bh(n->lock)
>                         neigh_notify
> neigh_notify
> 
> wouldn't both notifications be for REACHABLE?

Yes that's right, in this case it will consolidate both notifications to 
be the same, i.e., last state.

  reply	other threads:[~2022-06-16 18:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 23:01 neighbour netlink notifications delivered in wrong order Francesco Ruggeri
2022-06-07  2:07 ` Andy Roulin
2022-06-07  3:19   ` Stephen Hemminger
2022-06-07 16:29     ` Francesco Ruggeri
2022-06-07 17:32       ` Stephen Hemminger
2022-06-07 20:03         ` Francesco Ruggeri
2022-06-08  3:49           ` Andy Roulin
2022-06-09 16:40             ` Francesco Ruggeri
2022-06-10 16:18               ` Francesco Ruggeri
2022-06-16 18:33                 ` Andy Roulin [this message]
2023-04-11 19:49                   ` Kevin Mitchell
2023-04-12  0:41             ` Stephen Hemminger
2023-04-12  1:22               ` Stephen Hemminger

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=1e6d685a-66c3-3443-3b35-d7b0d0753a20@nvidia.com \
    --to=aroulin@nvidia.com \
    --cc=fruggeri@arista.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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 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.