public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: achender@kernel.org
Cc: Simon Horman <horms@kernel.org>,
	allison.henderson@oracle.com, rds-devel@oss.oracle.com,
	netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kuba@kernel.org
Subject: Re: [net-next,v1,7/7] net/rds: Trigger rds_send_ping() more than once
Date: Mon, 26 Jan 2026 17:47:54 +0000	[thread overview]
Message-ID: <20260126174754.1393215-1-horms@kernel.org> (raw)
In-Reply-To: <20260125070651.207042-8-achender@kernel.org>

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.

For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
net/rds: Trigger rds_send_ping() more than once

This commit ensures that rds_send_ping() is triggered after reconnect
to properly communicate path capabilities, especially after an RDS
module reload. It also validates source port modulo during fan-out.

> diff --git a/net/rds/send.c b/net/rds/send.c
> index ea3b57e9191b..8e7ece085ff1 100644
> --- a/net/rds/send.c
> +++ b/net/rds/send.c
> @@ -1328,6 +1328,23 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
>  		cpath = &conn->c_path[0];
>  	}
>
> +	/* c_npaths == 0 if we have not talked to this peer
> +	 * before.  Initiate a connection request to the
> +	 * peer right away.
> +	 */
> +	if (conn->c_trans->t_mp_capable &&
> +	    !rds_conn_path_up(&conn->c_path[0])) {

This isn't a bug, but the comment says "c_npaths == 0" while the code
checks "!rds_conn_path_up()". These conditions are different:
c_npaths == 0 means no paths negotiated yet, while !rds_conn_path_up()
is true for any state other than RDS_CONN_UP (DOWN, CONNECTING,
DISCONNECTING, ERROR, RESETTING).

The commit message mentions "after a re-connect to any peer" which
aligns with the code, but the comment specifically mentions c_npaths
which isn't checked. Should the comment be updated to reflect the
actual logic?

> +		/* Ensures that only one request is queued.  And
> +		 * rds_send_ping() ensures that only one ping is
> +		 * outstanding.
> +		 */

[ ... ]

      reply	other threads:[~2026-01-26 17:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-25  7:06 [PATCH net-next v1 0/7] net/rds: RDS-TCP protocol and extension improvements Allison Henderson
2026-01-25  7:06 ` [PATCH net-next v1 1/7] net/rds: new extension header: rdma bytes Allison Henderson
2026-01-26 17:46   ` [net-next,v1,1/7] " Simon Horman
2026-01-27  6:16     ` Allison Henderson
2026-01-25  7:06 ` [PATCH net-next v1 2/7] net/rds: Encode cp_index in TCP source port Allison Henderson
2026-01-25  7:06 ` [PATCH net-next v1 3/7] net/rds: rds_tcp_conn_path_shutdown must not discard messages Allison Henderson
2026-01-25  7:06 ` [PATCH net-next v1 4/7] net/rds: Kick-start TCP receiver after accept Allison Henderson
2026-01-25  7:06 ` [PATCH net-next v1 5/7] net/rds: Clear reconnect pending bit Allison Henderson
2026-01-25  7:06 ` [PATCH net-next v1 6/7] net/rds: Use the first lane until RDS_EXTHDR_NPATHS arrives Allison Henderson
2026-01-25  7:06 ` [PATCH net-next v1 7/7] net/rds: Trigger rds_send_ping() more than once Allison Henderson
2026-01-26 17:47   ` Simon Horman [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=20260126174754.1393215-1-horms@kernel.org \
    --to=horms@kernel.org \
    --cc=achender@kernel.org \
    --cc=allison.henderson@oracle.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rds-devel@oss.oracle.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