From: 王禹惟 <wangyuweihx@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, "Eric Dumazet" <edumazet@google.com>,
daniel@iogearbox.net, roopa@nvidia.com, dsahern@kernel.org,
秦迪 <qindi@staff.weibo.com>,
netdev@vger.kernel.org, wangyuweihx <wangyuweihx@gmail.com>
Subject: Re: [PATCH] net, neigh: introduce interval_probe_time for periodic probe
Date: Sun, 22 May 2022 02:12:35 +0800 [thread overview]
Message-ID: <CANmJ_FOkC=YZhex+fGyVsP_1bUBU3MsHMLbPzdixgU5PUGpONQ@mail.gmail.com> (raw)
In-Reply-To: <20220520175601.630bde21@kernel.org>
On Sat, May 21, 2022 at 8:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Fri, 20 May 2022 05:51:04 +0000 Yuwei Wang wrote:
> > commit 7482e3841d52 ("net, neigh: Add NTF_MANAGED flag for managed neighbor entries")
> > neighbor entries which with NTF_EXT_MANAGED flags will periodically call neigh_event_send()
> > for performing the resolution. and the interval was set to DELAY_PROBE_TIME
> >
> > DELAY_PROBE_TIME was configured as the first probe time delay, and it makes sense to set it to `0`.
> >
> > when DELAY_PROBE_TIME is `0`, the resolution of neighbor entries with NTF_EXT_MANAGED will
> > trap in an infinity recursion.
>
> Recursion or will constantly get re-resolved?
Recursive call `neigh_event_send_probe` with no interval,
which means threads of `system_power_efficient_wq` will consume 100% cpu.
Re-resolved or not depend on `neigh->nud_state`, if `neigh->nud_state`
is NUD_REACHABLE,
`neigh_event_send_probe` will return immediately with no action
>
> > as commit messages mentioned in the above commit, we should introduce a new option which means resolution interval.
> >
> > Signed-off-by: Yuwei Wang <wangyuweihx@gmail.com>
>
> > diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
> > index 39c565e460c7..5ae538be64b9 100644
> > --- a/include/uapi/linux/neighbour.h
> > +++ b/include/uapi/linux/neighbour.h
> > @@ -143,6 +143,7 @@ enum {
> > NDTPA_RETRANS_TIME, /* u64, msecs */
> > NDTPA_GC_STALETIME, /* u64, msecs */
> > NDTPA_DELAY_PROBE_TIME, /* u64, msecs */
> > + NDTPA_INTERVAL_PROBE_TIME, /* u64, msecs */
> > NDTPA_QUEUE_LEN, /* u32 */
> > NDTPA_APP_PROBES, /* u32 */
> > NDTPA_UCAST_PROBES, /* u32 */
>
> You can't insert values in the middle of a uAPI enum,
> you'll break binary compatibility with older kernels.
Thanks, I will move it to the tail in patch v2
prev parent reply other threads:[~2022-05-21 18:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 5:51 [PATCH] net, neigh: introduce interval_probe_time for periodic probe Yuwei Wang
2022-05-21 0:56 ` Jakub Kicinski
2022-05-21 18:12 ` 王禹惟 [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='CANmJ_FOkC=YZhex+fGyVsP_1bUBU3MsHMLbPzdixgU5PUGpONQ@mail.gmail.com' \
--to=wangyuweihx@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=qindi@staff.weibo.com \
--cc=roopa@nvidia.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).