From: David Ahern <dsahern@gmail.com>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, marek@cloudflare.com
Subject: Re: [PATCH net v2] net: neigh: fix multiple neigh timer scheduling
Date: Sun, 14 Jul 2019 07:58:19 -0600 [thread overview]
Message-ID: <26f58e35-f1f8-9543-819f-ef7f52da1e49@gmail.com> (raw)
In-Reply-To: <793a1166667e00a3553577e1505bebd435e22c88.1563041150.git.lorenzo.bianconi@redhat.com>
On 7/14/19 2:45 AM, Lorenzo Bianconi wrote:
> @@ -1124,7 +1125,9 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
>
> atomic_set(&neigh->probes,
> NEIGH_VAR(neigh->parms, UCAST_PROBES));
> - neigh->nud_state = NUD_INCOMPLETE;
> + if (check_timer)
> + neigh_del_timer(neigh);
Why not just always call neigh_del_timer and avoid the check_timer flag?
Let the NUD_IN_TIMER flag handle whether anything needs to be done.
> + neigh->nud_state = NUD_INCOMPLETE;
> neigh->updated = now;
> next = now + max(NEIGH_VAR(neigh->parms, RETRANS_TIME),
> HZ/2);
> @@ -1140,6 +1143,8 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
> }
> } else if (neigh->nud_state & NUD_STALE) {
> neigh_dbg(2, "neigh %p is delayed\n", neigh);
> + if (check_timer)
> + neigh_del_timer(neigh);
> neigh->nud_state = NUD_DELAY;
> neigh->updated = jiffies;
> neigh_add_timer(neigh, jiffies +
next prev parent reply other threads:[~2019-07-14 14:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-14 8:45 [PATCH net v2] net: neigh: fix multiple neigh timer scheduling Lorenzo Bianconi
2019-07-14 13:58 ` David Ahern [this message]
2019-07-14 19:15 ` David Miller
2019-07-14 20:04 ` Lorenzo Bianconi
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=26f58e35-f1f8-9543-819f-ef7f52da1e49@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=lorenzo.bianconi@redhat.com \
--cc=marek@cloudflare.com \
--cc=netdev@vger.kernel.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).