From: Yuya Kusakabe <yuya.kusakabe@gmail.com>
To: Andrea Mayer <andrea.mayer@uniroma2.it>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Gabriel Goller <g.goller@proxmox.com>,
Yuya Kusakabe <yuya.kusakabe@gmail.com>
Subject: [PATCH net-next v5 0/2] seg6: skip route refcounts in seg6local lookups
Date: Mon, 09 Nov 2026 09:10:13 +0900 [thread overview]
Message-ID: <20261109-seg6-lookup-noref-v5-0-96dc6a652c7e@gmail.com> (raw)
seg6local looks up the nexthop of its IPv6 and IPv4 behaviors from the
RCU read-side section of the receive path, yet takes and drops a route
reference for every packet. Skip the reference, as ip6_route_input()
and ip_rcv_finish() do.
An LLM coding assistant helped write and test this series.
---
Changes in v5:
- Rebase onto net-next after the merge window; no other changes.
- Link to v4: https://patch.msgid.link/20261023-seg6-lookup-noref-v4-0-0ad0a83960ef@gmail.com
Changes in v4:
- Take no reference on ip6_blk_hole_entry after a noref lookup,
including for a missing table. An End whose next segment is a local
address took one for every packet (Andrea Mayer).
- Comment that the noref helpers need RCU held until dst_input()
(Andrea Mayer, Sashiko).
- Link to v3: https://patch.msgid.link/20261015-seg6-lookup-noref-v3-0-6d51a60a67d3@gmail.com
Changes in v3:
- Keep the refcounted lookup in seg6_lookup_nexthop() and give
seg6_lookup_any_nexthop() a noref argument instead, so the BPF LWT
helpers see no change while a route is released (Andrea Mayer,
Gabriel Goller, Sashiko).
- Mention NFQUEUE reinjection and the release race in the commit
messages (Andrea Mayer).
- Link to v2: https://patch.msgid.link/20261010-seg6-lookup-noref-v2-0-51c09dd98197@gmail.com
Changes in v2:
- Split the lookup into a noref primitive for the seg6local input
actions and a refcounted seg6_lookup_nexthop() wrapper, which the BPF
LWT helpers also call (Andrea Mayer, Sashiko).
- Rebase onto net-next and re-measure.
- Link to v1: https://patch.msgid.link/20261005-seg6-lookup-noref-v1-0-092e84774e80@gmail.com
---
Yuya Kusakabe (2):
seg6: skip the route refcount in seg6local IPv6 lookups
seg6: skip the route refcount in seg6local IPv4 lookups
net/ipv6/seg6_local.c | 59 +++++++++++++++++++++++++++++++++++----------------
1 file changed, 41 insertions(+), 18 deletions(-)
---
base-commit: 7b6ab4dbc156e2f96419715130b3d5738a306c93
change-id: 20261004-seg6-lookup-noref-e016495b60ed
Best regards,
--
Yuya Kusakabe <yuya.kusakabe@gmail.com>
next reply other threads:[~2026-11-09 0:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 0:10 Yuya Kusakabe [this message]
2026-11-09 0:10 ` [PATCH net-next v5 1/2] seg6: skip the route refcount in seg6local IPv6 lookups Yuya Kusakabe
2026-11-09 0:10 ` [PATCH net-next v5 2/2] seg6: skip the route refcount in seg6local IPv4 lookups Yuya Kusakabe
2026-11-10 8:54 ` Hangbin Liu
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=20261109-seg6-lookup-noref-v5-0-96dc6a652c7e@gmail.com \
--to=yuya.kusakabe@gmail.com \
--cc=andrea.mayer@uniroma2.it \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=g.goller@proxmox.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®