Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Bernard Metzler <bernard.metzler@linux.dev>
To: Geliang Tang <geliang@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
	Leon Romanovsky <leon@kernel.org>
Cc: Geliang Tang <tanggeliang@kylinos.cn>, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/siw: drop duplicate check_app_limited in siw_tcp_sendpages
Date: Thu, 24 Sep 2026 16:53:43 +0200	[thread overview]
Message-ID: <54fdf56c-c210-4a31-83e8-25d7a3dfd9b5@linux.dev> (raw)
In-Reply-To: <32ef40cc81486adb8f2d43585224ab44d7e77f73.1790234916.git.tanggeliang@kylinos.cn>

On 24.09.2026 09:39, Geliang Tang wrote:
> 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);

Thank you Geliang, much appreciated.


Acked-by: Bernard Metzler <bernard.metzler@linux.dev>

  parent reply	other threads:[~2026-09-24 14:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-09-29 18:38 ` Leon Romanovsky

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=54fdf56c-c210-4a31-83e8-25d7a3dfd9b5@linux.dev \
    --to=bernard.metzler@linux.dev \
    --cc=geliang@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=tanggeliang@kylinos.cn \
    /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