From: James Prestwood <prestwoj@gmail.com>
To: Nikolay Aleksandrov <nikolay@nvidia.com>, netdev@vger.kernel.org
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>, Roopa Prabhu <roopa@nvidia.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Ido Schimmel <idosch@nvidia.com>,
Chinmay Agarwal <chinagar@codeaurora.org>,
Yajun Deng <yajun.deng@linux.dev>, Tong Zhu <zhutong@amazon.com>,
Johannes Berg <johannes@sipsolutions.net>,
Jouni Malinen <jouni@codeaurora.org>
Subject: Re: [PATCH v3] net: neighbour: introduce EVICT_NOCARRIER table option
Date: Mon, 18 Oct 2021 09:27:31 -0700 [thread overview]
Message-ID: <a9fc0e074fb10a2df7a75cd7381cd8e4db7ce924.camel@gmail.com> (raw)
In-Reply-To: <fc84cc7e-142f-48cb-2638-6cbc5b625782@nvidia.com>
On Sat, 2021-10-16 at 14:12 +0300, Nikolay Aleksandrov wrote:
> On 15/10/2021 23:06, James Prestwood wrote:
> > This adds an option to ARP/NDISC tables that clears the table on
> > NOCARRIER events. The default option (1) maintains existing
> > behavior.
> >
> > Clearing the ARP cache on NOCARRIER is relatively new, introduced
> > by:
> [snip]
> > Signed-off-by: James Prestwood <prestwoj@gmail.com>
> > ---
> > Documentation/networking/ip-sysctl.rst | 9 +++++++++
> > include/net/neighbour.h | 3 ++-
> > include/uapi/linux/neighbour.h | 1 +
> > net/core/neighbour.c | 18 +++++++++++++-----
> > net/ipv4/arp.c | 1 +
> > net/ipv6/ndisc.c | 1 +
> > 6 files changed, 27 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/networking/ip-sysctl.rst
> > b/Documentation/networking/ip-sysctl.rst
> > index 16b8bf72feaf..e2aced01905a 100644
> > --- a/Documentation/networking/ip-sysctl.rst
> > +++ b/Documentation/networking/ip-sysctl.rst
> > @@ -200,6 +200,15 @@ neigh/default/unres_qlen - INTEGER
> >
> > Default: 101
> >
> > +neigh/default/evict_nocarrier - BOOLEAN
> > + Clears the neighbor cache on NOCARRIER events. This option
> > is important
> > + for wireless devices where the cache should not be cleared
> > when roaming
> > + between access points on the same network. In most cases
> > this should
> > + remain as the default (1).
> > +
> > + - 1 - (default): Clear the neighbor cache on NOCARRIER
> > events
> > + - 0 - Do not clear neighbor cache on NOCARRIER events
> > +
> > mtu_expires - INTEGER
> > Time, in seconds, that cached PMTU information is kept.
> >
> > diff --git a/include/net/neighbour.h b/include/net/neighbour.h
> > index e8e48be66755..71b28f83c3d3 100644
> > --- a/include/net/neighbour.h
> > +++ b/include/net/neighbour.h
> > @@ -54,7 +54,8 @@ enum {
> > NEIGH_VAR_ANYCAST_DELAY,
> > NEIGH_VAR_PROXY_DELAY,
> > NEIGH_VAR_LOCKTIME,
> > -#define NEIGH_VAR_DATA_MAX (NEIGH_VAR_LOCKTIME + 1)
> > + NEIGH_VAR_EVICT_NOCARRIER,
> > +#define NEIGH_VAR_DATA_MAX (NEIGH_VAR_EVICT_NOCARRIER + 1)
> > /* Following are used as a second way to access one of the
> > above */
> > NEIGH_VAR_QUEUE_LEN, /* same data as
> > NEIGH_VAR_QUEUE_LEN_BYTES */
> > NEIGH_VAR_RETRANS_TIME_MS, /* same data as
> > NEIGH_VAR_RETRANS_TIME */
> > diff --git a/include/uapi/linux/neighbour.h
> > b/include/uapi/linux/neighbour.h
> > index db05fb55055e..4322e5f42646 100644
> > --- a/include/uapi/linux/neighbour.h
> > +++ b/include/uapi/linux/neighbour.h
> > @@ -151,6 +151,7 @@ enum {
> > NDTPA_LOCKTIME, /* u64, msecs */
> > NDTPA_QUEUE_LENBYTES, /* u32 */
> > NDTPA_MCAST_REPROBES, /* u32 */
> > + NDTPA_EVICT_NOCARRIER, /* u8 */
> > NDTPA_PAD,
> > __NDTPA_MAX
> > };
>
> I think this should be the last attribute (after PAD).
Sure.
>
> Since this is a single patch you don't really need a cover letter,
> you can add the version
> changes below ---. Also your cover letter says v2 and the patch says
> v3.
Ok, I'll move it into the patch itself.
Thanks,
James
>
> Cheers,
> Nik
>
prev parent reply other threads:[~2021-10-18 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 20:06 [PATCH v2 0/1] Make neighbor eviction controllable by userspace James Prestwood
2021-10-15 20:06 ` [PATCH v3] net: neighbour: introduce EVICT_NOCARRIER table option James Prestwood
2021-10-16 11:12 ` Nikolay Aleksandrov
2021-10-18 16:27 ` James Prestwood [this message]
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=a9fc0e074fb10a2df7a75cd7381cd8e4db7ce924.camel@gmail.com \
--to=prestwoj@gmail.com \
--cc=chinagar@codeaurora.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=idosch@nvidia.com \
--cc=johannes@sipsolutions.net \
--cc=jouni@codeaurora.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=roopa@nvidia.com \
--cc=vladimir.oltean@nxp.com \
--cc=yajun.deng@linux.dev \
--cc=yoshfuji@linux-ipv6.org \
--cc=zhutong@amazon.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 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).