From: Stephen Hemminger <stephen@networkplumber•org>
To: Vasily Khoruzhick <vasilykh@arista•com>
Cc: "David S. Miller" <davem@davemloft•net>,
Roopa Prabhu <roopa@cumulusnetworks•com>,
Alexey Dobriyan <adobriyan@gmail•com>,
Eric Dumazet <edumazet@google•com>,
Jim Westfall <jwestfall@surrealistic•net>,
Wolfgang Bumiller <w.bumiller@proxmox•com>,
Vasily Khoruzhick <anarsoul@gmail•com>,
Kees Cook <keescook@chromium•org>,
Ihar Hrachyshka <ihrachys@redhat•com>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH v2] neighbour: confirm neigh entries when ARP packet is received
Date: Tue, 11 Sep 2018 11:12:17 -0700 [thread overview]
Message-ID: <20180911111217.3e3679c5@xeon-e3> (raw)
In-Reply-To: <20180911180406.31283-1-vasilykh@arista.com>
On Tue, 11 Sep 2018 11:04:06 -0700
Vasily Khoruzhick <vasilykh@arista•com> wrote:
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index aa19d86937af..56a554597db5 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -1180,6 +1180,12 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
> lladdr = neigh->ha;
> }
>
> + /* Update confirmed timestamp for neighbour entry after we
> + * received ARP packet even if it doesn't change IP to MAC binding.
> + */
> + if (new & NUD_CONNECTED)
> + neigh->confirmed = jiffies;
You might want to do:
if ((new & NUD_CONNECTED) && neigh->confirmed != jiffies)
neigh->confirmed = jiffies;
This avoid poisoning the cacheline with unnecessary write.
next prev parent reply other threads:[~2018-09-11 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 18:04 [PATCH v2] neighbour: confirm neigh entries when ARP packet is received Vasily Khoruzhick
2018-09-11 18:12 ` Stephen Hemminger [this message]
2018-09-11 18:23 ` Vasiliy Khoruzhick
2018-09-12 9:05 ` Sergei Shtylyov
2018-09-13 16:04 ` 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=20180911111217.3e3679c5@xeon-e3 \
--to=stephen@networkplumber$(echo .)org \
--cc=adobriyan@gmail$(echo .)com \
--cc=anarsoul@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=ihrachys@redhat$(echo .)com \
--cc=jwestfall@surrealistic$(echo .)net \
--cc=keescook@chromium$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=roopa@cumulusnetworks$(echo .)com \
--cc=vasilykh@arista$(echo .)com \
--cc=w.bumiller@proxmox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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