From: James Prestwood <prestwoj@gmail.com>
To: David Ahern <dsahern@gmail.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>,
Nikolay Aleksandrov <nikolay@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 v5 0/2] Make neighbor eviction controllable by userspace
Date: Thu, 21 Oct 2021 14:59:09 -0700 [thread overview]
Message-ID: <1903d7cb20ac31d95e2440424a00190522facb47.camel@gmail.com> (raw)
In-Reply-To: <a33c3f84-7333-294a-9e78-580cbdac6ec1@gmail.com>
Hi David,
On Wed, 2021-10-20 at 20:33 -0600, David Ahern wrote:
> On 10/20/21 6:32 PM, James Prestwood wrote:
> > v1 -> v2:
> >
> > - It was suggested by Daniel Borkmann to extend the neighbor table
> > settings
> > rather than adding IPv4/IPv6 options for ARP/NDISC separately. I
> > agree
> > this way is much more concise since there is now only one place
> > where the
> > option is checked and defined.
> > - Moved documentation/code into the same patch
> > - Explained in more detail the test scenario and results
> >
> > v2 -> v3:
> >
> > - Renamed 'skip_perm' to 'nocarrier'. The way this parameter is
> > used
> > matches this naming.
> > - Changed logic to still flush if 'nocarrier' is false.
> >
> > v3 -> v4:
> >
> > - Moved NDTPA_EVICT_NOCARRIER after NDTPA_PAD
> >
> > v4 -> v5:
> >
> > - Went back to the original v1 patchset and changed:
> > - Used ANDCONF for IN_DEV macro
> > - Got RCU lock prior to __in_dev_get_rcu(). Do note that the logic
> > here was extended to handle if __in_dev_get_rcu() fails. If this
> > happens the existing behavior should be maintained and set the
> > carrier down. I'm unsure if get_rcu() can fail in this context
> > though. Similar logic was used for in6_dev_get.
> > - Changed ndisc_evict_nocarrier to use a u8, proper handler, and
> > set min/max values.
> >
>
> I'll take a deep dive on the patches tomorrow.
>
> You need to add a selftests script under tools/testing/selftests/net
> that shows this behavior with the new setting set and unset. This is
> easily done with veth pairs and network namespaces (one end of the
> veth
> pair down sets the other into no-carrier). Take a look at the scripts
> there - e.g., fib_nexthops.sh should provide a template for a start
> point.
So the test itself is pretty simple. The part I'm unsure about is how
you actually set the carrier state from userspace. I see "ip link set
<dev> carrier {on,off}" but this reports not supported for veths,
wlans, and eth interfaces I have tried. AFAIK the driver controls the
carrier state. Maybe some drivers do support this?
Is there a way to set the carrier state that you, or anyone is aware
of?
Thanks,
James
next prev parent reply other threads:[~2021-10-21 22:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 0:32 [PATCH v5 0/2] Make neighbor eviction controllable by userspace James Prestwood
2021-10-21 0:32 ` [PATCH v5 1/2] net: arp: introduce arp_evict_nocarrier sysctl parameter James Prestwood
2021-10-21 14:08 ` David Ahern
2021-10-21 0:32 ` [PATCH v5 2/2] net: ndisc: introduce ndisc_evict_nocarrier " James Prestwood
2021-10-21 14:15 ` David Ahern
2021-10-21 2:33 ` [PATCH v5 0/2] Make neighbor eviction controllable by userspace David Ahern
2021-10-21 21:59 ` James Prestwood [this message]
2021-10-21 22:09 ` David Ahern
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=1903d7cb20ac31d95e2440424a00190522facb47.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@gmail.com \
--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).