Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] RDMA/siw: drop duplicate check_app_limited in siw_tcp_sendpages
@ 2026-09-24  7:39 Geliang Tang
  2026-09-24  7:44 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Geliang Tang @ 2026-09-24  7:39 UTC (permalink / raw)
  To: Bernard Metzler, Jason Gunthorpe, Leon Romanovsky
  Cc: Geliang Tang, linux-rdma

From: Geliang Tang <tanggeliang@kylinos.cn>

After do_tcp_sendpages() was converted to use MSG_SPLICE_PAGES and
later inlined as direct tcp_sendmsg_locked() calls, callers that
previously needed an explicit tcp_rate_check_app_limited(sk) to cover
do_tcp_sendpages() no longer need it. tcp_sendmsg_locked() performs the
check on every path that queues data, making the outer call redundant.

The site changed here, siw_tcp_sendpages() in siw_qp_tx.c, holds the socket
lock and invokes tcp_sendmsg_locked() on every iteration. The early-return
paths in tcp_sendmsg_locked() that skip tcp_rate_check_app_limited() - the
MSG_ZEROCOPY allocation failure and MSG_FASTOPEN branches - return without
queueing any MSG_SPLICE_PAGES data, so there is no functional consequence
from omitting the outer check.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
Hi,

I'm Geliang from the MPTCP community. While developing "MPTCP sockmap" and
"MPTCP KTLS", I found this duplicate check_app_limited issue. I recently
submitted patches to remove it in BPF [1] and TLS [2], both of which have
been accepted. I noticed the same duplicate check_app_limited also exists
in siw_tcp_sendpages, so I'm sending this patch to remove it as well.

Thanks,
-Geliang

[1]
https://patchwork.kernel.org/project/netdevbpf/patch/1f7dc605b16fc0590f7cbf5a27d57271926c01ce.1790074764.git.tanggeliang@kylinos.cn/
[2]
https://patchwork.kernel.org/project/netdevbpf/patch/5bc803abb4e27054eaffc8b26db7812e6347b0dd.1789634247.git.tanggeliang@kylinos.cn/
---
 drivers/infiniband/sw/siw/siw_qp_tx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/sw/siw/siw_qp_tx.c b/drivers/infiniband/sw/siw/siw_qp_tx.c
index f7dd32c6e5ba..56bd009879c2 100644
--- a/drivers/infiniband/sw/siw/siw_qp_tx.c
+++ b/drivers/infiniband/sw/siw/siw_qp_tx.c
@@ -336,7 +336,6 @@ static int siw_tcp_sendpages(struct socket *s, struct page **page, int offset,
 		if (size + offset <= PAGE_SIZE)
 			msg.msg_flags &= ~MSG_MORE;
 
-		tcp_rate_check_app_limited(sk);
 		if (!sendpage_ok(page[i]))
 			msg.msg_flags &= ~MSG_SPLICE_PAGES;
 		bvec_set_page(&bvec, page[i], bytes, offset);
-- 
2.53.0


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

end of thread, other threads:[~2026-09-29 18:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24  7:39 [PATCH] RDMA/siw: drop duplicate check_app_limited in siw_tcp_sendpages Geliang Tang
2026-09-24  7:44 ` sashiko-bot
2026-09-24 14:53 ` Bernard Metzler
2026-09-29 18:38 ` Leon Romanovsky

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