Netdev List
 help / color / mirror / Atom feed
* [PATCH net v3 0/2] net/rds: scope-aware sendmsg connection cache
@ 2026-10-03 16:35 Allison Henderson
  2026-10-03 16:35 ` [PATCH net v3 1/2] net/rds: keep the connected peer's scope id apart from the bound one Allison Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Allison Henderson @ 2026-10-03 16:35 UTC (permalink / raw)
  To: netdev, linux-rdma, pabeni, edumazet, kuba, horms; +Cc: achender

Hi all,

This is v3 of the sendmsg connection-cache scope fix (v1 at [1], v2 at
[2]), now two patches.

  Patch 1 gives the connected peer's link-local scope its own field.
  rds_connect() used to store it in rs_bound_scope_id, the scope of
  the socket's own bound address, which a later bind() to a
  non-link-local address resets to 0 and which a later connect()
  pollutes for a globally bound socket.  A send without a destination
  now takes its scope from the connected peer's field, and rds_bind()'s
  connected-socket check compares against it.

  Patch 2 compares c_dev_if with the request's scope in the cache-hit
  test, so the cache uses the same key as rds_conn_lookup().

Changes since v2 [2]:
 - The v2 "scope 0 matches anything" wildcard is gone: it sent a
   connected socket's traffic out whichever interface the socket last
   used explicitly (review of v2).  Instead the destination-less send
   carries the connected peer's scope (new patch 1), and the comparison
   is exact.
 - Rebased onto current net.

Changes since v1 [1]:
 - A request without a scope kept matching the cached connection
   (superseded by the above).

[1] https://lore.kernel.org/netdev/20260921215046.174745-1-achender@kernel.org/
[2] https://lore.kernel.org/netdev/20260927062312.169097-1-achender@kernel.org/

Thank you,
Allison


Allison Henderson (2):
  net/rds: keep the connected peer's scope id apart from the bound one
  net/rds: include the scope id in the sendmsg connection cache check

 net/rds/af_rds.c | 12 ++++++++----
 net/rds/bind.c   |  4 ++--
 net/rds/rds.h    |  2 ++
 net/rds/send.c   |  5 +++--
 4 files changed, 15 insertions(+), 8 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2026-10-04 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03 16:35 [PATCH net v3 0/2] net/rds: scope-aware sendmsg connection cache Allison Henderson
2026-10-03 16:35 ` [PATCH net v3 1/2] net/rds: keep the connected peer's scope id apart from the bound one Allison Henderson
2026-10-04 16:41   ` netdev-bot+sashiko
2026-10-03 16:35 ` [PATCH net v3 2/2] net/rds: include the scope id in the sendmsg connection cache check Allison Henderson
2026-10-04 16:41   ` netdev-bot+sashiko
2026-10-03 16:39 ` [PATCH net v3 0/2] net/rds: scope-aware sendmsg connection cache netdev-bot+sinfo

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