public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] seg6: fix dst_cache sharing in seg6 lwtunnel
@ 2026-04-01 18:57 Andrea Mayer
  2026-04-01 18:57 ` [PATCH net v2 1/2] seg6: separate dst_cache for input and output paths " Andrea Mayer
  2026-04-01 18:57 ` [PATCH net v2 2/2] selftests: seg6: add test for dst_cache isolation " Andrea Mayer
  0 siblings, 2 replies; 6+ messages in thread
From: Andrea Mayer @ 2026-04-01 18:57 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, kuba, pabeni, horms, dsahern, david.lebrun,
	stefano.salsano, paolo.lungaroni, nicolas.dichtel, linux-kernel,
	Andrea Mayer

The seg6 lwtunnel encap uses a single per-route dst_cache shared
between seg6_input_core() and seg6_output_core(). These two paths
can perform the post-encap SID lookup in different routing contexts
(e.g., ip rules matching on the ingress interface, or VRF table
separation). Whichever path runs first populates the cache, and the
other reuses it blindly, bypassing its own lookup.

Patch 1 fixes this by splitting the cache into cache_input and
cache_output. Patch 2 adds a selftest that validates the isolation.

Changes v1 -> v2:
 - Patch 2: fix SKIP message wording (Nicolas)

Andrea Mayer (2):
  seg6: separate dst_cache for input and output paths in seg6 lwtunnel
  selftests: seg6: add test for dst_cache isolation in seg6 lwtunnel

 net/ipv6/seg6_iptunnel.c                      |  34 ++--
 tools/testing/selftests/net/Makefile          |   1 +
 .../selftests/net/srv6_iptunnel_cache.sh      | 177 ++++++++++++++++++
 3 files changed, 201 insertions(+), 11 deletions(-)
 create mode 100755 tools/testing/selftests/net/srv6_iptunnel_cache.sh

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-03 14:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01 18:57 [PATCH net v2 0/2] seg6: fix dst_cache sharing in seg6 lwtunnel Andrea Mayer
2026-04-01 18:57 ` [PATCH net v2 1/2] seg6: separate dst_cache for input and output paths " Andrea Mayer
2026-04-02 18:30   ` Justin Iurman
2026-04-01 18:57 ` [PATCH net v2 2/2] selftests: seg6: add test for dst_cache isolation " Andrea Mayer
2026-04-02 18:35   ` Justin Iurman
2026-04-03 14:46     ` Andrea Mayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox