Thread (6 messages) 6 messages, 3 authors, 17d ago

[PATCH net-next v4 2/2] net/rds: log the port a listener actually bound

flat view
COLD17d IN NET-NEXT

From: Allison Henderson <achender@kernel.org>
Date: 2026-09-27 06:31:00
Also in: linux-rdma
Subsystem: networking [general], rds - reliable datagram sockets, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Allison Henderson, Linus Torvalds

Queued in net-next as 00d77b181866 on 2026-10-02.

rds_rdma_listen_init_common() reports every listener as being on
RDS_PORT, but only the IPv4 caller binds that port; the IPv6 listener
is bound to RDS_CM_PORT, as rds_rdma_listen_init() explains, and its
debug line has claimed 18634 instead of 16385 since it was added.

Print the port from the address the helper just bound.

Assisted-by: Claude-Code:claude-fable-5
Signed-off-by: Allison Henderson <achender@kernel.org>
---
 net/rds/rdma_transport.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c
index 91ff1dde26af..3f853004c490 100644
--- a/net/rds/rdma_transport.c
+++ b/net/rds/rdma_transport.c
@@ -236,7 +236,10 @@ static int rds_rdma_listen_init_common(rdma_cm_event_handler handler,
 		goto out;
 	}
 
-	rdsdebug("cm %p listening on port %u\n", cm_id, RDS_PORT);
+	rdsdebug("cm %p listening on port %u\n", cm_id,
+		 ntohs(sa->sa_family == AF_INET6 ?
+		       ((struct sockaddr_in6 *)sa)->sin6_port :
+		       ((struct sockaddr_in *)sa)->sin_port));
 
 	*ret_cm_id = cm_id;
 	cm_id = NULL;
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help