]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/rds: Use the first lane until RDS_EXTHDR_NPATHS arrives
authorGerd Rausch <gerd.rausch@oracle.com>
Tue, 3 Feb 2026 05:57:22 +0000 (22:57 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 04:46:39 +0000 (20:46 -0800)
commita1f53d5fb6b2e4c81b438ea41f5f16482d084e08
tree3337cbd45feecc583c6ca8291c0538b57185bc25
parent9d30ad8a8bc0569ac833427094d18df46fb439e6
net/rds: Use the first lane until RDS_EXTHDR_NPATHS arrives

Instead of just blocking the sender until "c_npaths" is known
(it gets updated upon the receipt of a MPRDS PONG message),
simply use the first lane (cp_index#0).

But just using the first lane isn't enough.

As soon as we enqueue messages on a different lane, we'd run the risk
of out-of-order delivery of RDS messages.

Earlier messages enqueued on "cp_index == 0" could be delivered later
than more recent messages enqueued on "cp_index > 0", mostly because of
possible head of line blocking issues causing the first lane to be
slower.

To avoid that, we simply take a snapshot of "cp_next_tx_seq" at the
time we're about to fan-out to more lanes.

Then we delay the transmission of messages enqueued on other lanes
with "cp_index > 0" until cp_index#0 caught up with the delivery of
new messages (from "cp_send_queue") as well as in-flight
messages (from "cp_retrans") that haven't been acknowledged yet
by the receiver.

We also add a new counter "mprds_catchup_tx0_retries" to keep track
of how many times "rds_send_xmit" had to suspend activities,
because it was waiting for the first lane to catch up.

Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Link: https://patch.msgid.link/20260203055723.1085751-8-achender@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rds/rds.h
net/rds/recv.c
net/rds/send.c
net/rds/stats.c