From nobody Sat Feb 7 10:08:07 2026 Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B3EE84A35 for ; Thu, 5 Feb 2026 06:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770273731; cv=none; b=msJeWOwBUy3z1qZl14FHX1AjSXzC0ObTXMNwRnGy2ZKfnEq4v52lf7b9SxPHPZkwIDHGjrmmZQBHpXvTB31nvPuDf8FO7TiNTtTQ+xb+jvUd2Ec3g01KA1amWCcjYaTNuVCyTHaB7ZSVb8zkXACcExjUjNLe1QwvSKdghmw0SIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770273731; c=relaxed/simple; bh=kl/TABK7TfITOkH1sVxyz/2Q4PJ1vcVpiKgGe/AZCfw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aXbtZup4jERYnaiPSnHuW29UddeSWer6ztJarnVnIb6u+BteZt4EwYJ7WSXN12kuNaJsE41iS4+EFqN0l9p1BKy0wJ/eEA2CScx7Vd20GjdbdmfrUtkZMK9snUtFLbyhxtoR4Sd9nYvqSwWh2oGH0/7oWrndO7rOtUkQd6MGsSk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ElH8QXzI; arc=none smtp.client-ip=95.215.58.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ElH8QXzI" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770273728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pVFEWIU/iyFnjtryoljgas1wdQL9lNlyk46ofJwNPyY=; b=ElH8QXzI+QnTVukWSSgJLJymx+pppKu9S+/i4puhyPocZI2YaGbkWB2TG0e/lBEVjjPdAh YE5AbYF6nfSydvv39uaVIW9LFQAb89EKpcq+Ji9pVbS52BzDwNTf/spdxVhngZBs/AUWLi iulQQaraRSSW60du8dwHLr3VqLCQYoA= From: Gang Yan To: mptcp@lists.linux.dev, pabeni@redhat.com Cc: Gang Yan , Geliang Tang Subject: [Patch mptcp-net 1/3] mptcp: add backlog_list bug reproducer test Date: Thu, 5 Feb 2026 14:41:29 +0800 Message-ID: <500a8fe690cb8718ea32c33ae8cdcb2df203ecd0.1770273341.git.yangang@kylinos.cn> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Gang Yan This patch introduces a test program to reproduce bugs related to the backlog_list in MPTCP. The test is derived from tls.c in the selftests suite, but adapted to work without TLS configuration specifically for MPTCP testing. The program performs chunked sendfile operations with various payload sizes to exercise different code paths and trigger backlog_list-related issues. It can be run in .virtme-exec-run: run_loop run_selftest_one ./multi_chunk.sh ''' selftest Test: ./multi_chunk.sh TAP version 13 1..1 [stalls for a while] ^C ''' Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan --- tools/testing/selftests/net/mptcp/Makefile | 1 + .../testing/selftests/net/mptcp/multi_chunk.c | 148 ++++++++++++++++++ .../selftests/net/mptcp/multi_chunk.sh | 37 +++++ 3 files changed, 186 insertions(+) create mode 100644 tools/testing/selftests/net/mptcp/multi_chunk.c create mode 100755 tools/testing/selftests/net/mptcp/multi_chunk.sh diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/sel= ftests/net/mptcp/Makefile index 22ba0da2adb8..087e6ae6f0b8 100644 --- a/tools/testing/selftests/net/mptcp/Makefile +++ b/tools/testing/selftests/net/mptcp/Makefile @@ -24,6 +24,7 @@ TEST_GEN_FILES :=3D \ mptcp_diag \ mptcp_inq \ mptcp_sockopt \ + multi_chunk \ pm_nl_ctl \ # end of TEST_GEN_FILES =20 diff --git a/tools/testing/selftests/net/mptcp/multi_chunk.c b/tools/testin= g/selftests/net/mptcp/multi_chunk.c new file mode 100644 index 000000000000..8c97db58a6db --- /dev/null +++ b/tools/testing/selftests/net/mptcp/multi_chunk.c @@ -0,0 +1,148 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef IPPROTO_MPTCP +#define IPPROTO_MPTCP 262 +#endif + +#define TLS_PAYLOAD_MAX_LEN 16384 +#define TEST_PORT 12345 + +static void chunked_sendfile(int cfd, int sfd, + size_t chunk_size, + size_t extra_payload_size) +{ + char buf[TLS_PAYLOAD_MAX_LEN]; + uint16_t test_payload_size; + size_t recved =3D 0; + size_t sent =3D 0; + int size =3D 0; + int ret; + char filename[] =3D "/tmp/mytemp.XXXXXX"; + int fd =3D mkstemp(filename); + off_t offset =3D 0; + + unlink(filename); + if (fd <=3D 0) { + perror("tempfile"); + exit(1); + } + if (chunk_size < 1) { + perror("chunksize"); + exit(1); + } + + test_payload_size =3D chunk_size + extra_payload_size; + if (test_payload_size > TLS_PAYLOAD_MAX_LEN) { + perror("payload_size"); + exit(1); + } + memset(buf, 1, test_payload_size); + size =3D write(fd, buf, test_payload_size); + if (size !=3D test_payload_size) { + perror("file write"); + exit(1); + } + fsync(fd); + + while (size > 0) { + ret =3D sendfile(sfd, fd, &offset, chunk_size); + if (ret <=3D 0) + exit(1); + size -=3D ret; + sent +=3D ret; + } + printf("[client] sent %zu bytes\n", sent); + + recved =3D recv(cfd, buf, test_payload_size, MSG_WAITALL); + printf("[server] receieved %zu bytes\n", recved); + + if (recved !=3D test_payload_size) + exit(1); + + close(fd); +} + +int main() +{ + int sfd =3D socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP); + int cfd =3D socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP); + struct sockaddr_in addr =3D {0}; + socklen_t addrlen =3D sizeof(addr); + + printf("=3D=3D=3D=3D multi_chunk_sendfile MPTCP test =3D=3D=3D=3D\n"); + + if (sfd < 0 || cfd < 0) { + perror("socket"); + exit(1); + } + + addr.sin_family =3D AF_INET; + addr.sin_addr.s_addr =3D htonl(INADDR_LOOPBACK); + addr.sin_port =3D htons(TEST_PORT); + + if (bind(sfd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { + perror("bind"); + exit(1); + } + + if (listen(sfd, 1) < 0) { + perror("listen"); + exit(1); + } + + if (getsockname(sfd, (struct sockaddr *)&addr, &addrlen) < 0) { + perror("getsockname"); + exit(1); + } + + if (connect(cfd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { + perror("connect"); + exit(1); + } + + int nfd =3D accept(sfd, NULL, NULL); + if (nfd < 0) { + perror("accept"); + exit(1); + } + + chunked_sendfile(cfd, nfd, 4096, 4096); + chunked_sendfile(cfd, nfd, 4096, 0); + chunked_sendfile(cfd, nfd, 4096, 1); + chunked_sendfile(cfd, nfd, 4096, 2048); + chunked_sendfile(cfd, nfd, 8192, 2048); + chunked_sendfile(cfd, nfd, 4096, 8192); + chunked_sendfile(cfd, nfd, 8192, 4096); + chunked_sendfile(cfd, nfd, 12288, 1024); + chunked_sendfile(cfd, nfd, 12288, 2000); + chunked_sendfile(cfd, nfd, 15360, 100); + chunked_sendfile(cfd, nfd, 15360, 300); + chunked_sendfile(cfd, nfd, 1, 4096); + chunked_sendfile(cfd, nfd, 2048, 4096); + chunked_sendfile(cfd, nfd, 2048, 8192); + chunked_sendfile(cfd, nfd, 4096, 8192); + chunked_sendfile(cfd, nfd, 1024, 12288); + chunked_sendfile(cfd, nfd, 2000, 12288); + chunked_sendfile(cfd, nfd, 100, 15360); + chunked_sendfile(cfd, nfd, 300, 15360); + + close(cfd); + close(nfd); + close(sfd); + + printf("=3D=3D=3D=3D test ends =3D=3D=3D=3D\n"); + return 0; +} diff --git a/tools/testing/selftests/net/mptcp/multi_chunk.sh b/tools/testi= ng/selftests/net/mptcp/multi_chunk.sh new file mode 100755 index 000000000000..c0352c89087f --- /dev/null +++ b/tools/testing/selftests/net/mptcp/multi_chunk.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +. "$(dirname "${0}")/mptcp_lib.sh" + +cleanup() +{ + if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then + kill "$pid" 2>/dev/null + wait "$pid" 2>/dev/null + fi + + mptcp_lib_ns_exit "${ns1}" +} + +init() +{ + mptcp_lib_ns_init ns1 + + local i + for i in $(seq 1 4); do + mptcp_lib_pm_nl_add_endpoint "${ns1}" "127.0.0.1" flags signal port 1000= $i + done + + mptcp_lib_pm_nl_set_limits "${ns1}" 8 8 + + ip netns exec ${ns1} ip mptcp endpoint show + ip netns exec ${ns1} ip mptcp limits +} + +init +trap cleanup EXIT + +ip netns exec $ns1 ./multi_chunk & + +pid=3D$! +wait $pid --=20 2.43.0 From nobody Sat Feb 7 10:08:07 2026 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55CE884A35 for ; Thu, 5 Feb 2026 06:42:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770273733; cv=none; b=lHjh/w2lGvowopA/my+Sq5vpc4XaD2ePSsnuMX6e2yGTdfryPwZt5Cch90K09KHyuuVfX0cHxo0NKor43DdEGPoXohlHKFMnt9YK17P81lr7TXBzOlI8NWfxh9UZ1VBXNZ1bOlTyR+eFbrc0HAGWXZbsQrKTT3UIHhXOIWmVU6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770273733; c=relaxed/simple; bh=Dh1p3mXzhs4Q4Ypf0hf5QErW/qi5sjjajF/yhlT2s7o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AJ4phXzjMS2PpOCBCqhPa+hayim12BHSDStBBkiHa3R9z4tR++zfHQSANt8l7KYl6ps1fKTehtyO6FzcBesRF5epDpDjB42sYoL6RIhpOGNriTHjHmamlxjalOqcfm779DWPuWIcSfAErTTwZNTXsUGzpxwExtvmT/jygzOBzco= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=CbDaiZ1P; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CbDaiZ1P" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770273731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wdw8TkhBhXjG4s+5wegI9V+rVUeqLUJsdmljdZr6kIk=; b=CbDaiZ1Pcb6Sy3eZm6DT0eyBWquEfcbMq43VB03xKeFLPpkb4dmh2V/WcGtgqvBrEfEqjR n+HjWzQlK1HB4Sag3vMSdANG5kapGimbHLreH0MZSzhqI05icGZoNSCNocnm9dDuJe9Wlw KpZUys8BASYWx6davzD0ZuxGeGvc6uA= From: Gang Yan To: mptcp@lists.linux.dev, pabeni@redhat.com Cc: Gang Yan , Geliang Tang Subject: [Patch mptcp-net 2/3] mptcp: fix receive stalls when 'ack_seq' in backlog_list Date: Thu, 5 Feb 2026 14:41:30 +0800 Message-ID: <7bee08bb168041f1fa0440b1b605548bdc03f241.1770273341.git.yangang@kylinos.cn> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Gang Yan This patch fixes the first backlog_list issue, which can be 100% reproduced by the multi_chunk.sh test case. The problem occurs when out-of-order (OFO) queue data accumulates, causing sk_rmem_alloc to exceed sk_rcvbuf. In this condition, skbs in backlog_list fail to move to sk->receive_queue even when the receive queue is empty, leading to transmission stalls. This patch adds an empty check for sk->receieve_queue, when it is empty, the skb should moved too. Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan --- net/mptcp/protocol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index ff06bbee7781..b6bafc37eea4 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2176,7 +2176,8 @@ static bool __mptcp_move_skbs(struct sock *sk, struct= list_head *skbs, u32 *delt *delta =3D 0; while (1) { /* If the msk recvbuf is full stop, don't drop */ - if (sk_rmem_alloc_get(sk) > sk->sk_rcvbuf) + if (sk_rmem_alloc_get(sk) > sk->sk_rcvbuf && + !skb_queue_empty(&sk->sk_receive_queue)) break; =20 prefetch(skb->next); @@ -2208,7 +2209,8 @@ static bool mptcp_can_spool_backlog(struct sock *sk, = struct list_head *skbs) =20 /* Don't spool the backlog if the rcvbuf is full. */ if (list_empty(&msk->backlog_list) || - sk_rmem_alloc_get(sk) > sk->sk_rcvbuf) + (sk_rmem_alloc_get(sk) > sk->sk_rcvbuf && + !skb_queue_empty(&sk->sk_receive_queue))) return false; =20 INIT_LIST_HEAD(skbs); --=20 2.43.0 From nobody Sat Feb 7 10:08:07 2026 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8E2F84A35 for ; Thu, 5 Feb 2026 06:42:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770273736; cv=none; b=FvGMyJIUTX8lCnPvjgbaAfWSencrftVvIUxwKmYpyOzRoeW4wbHTTPE4fgYQ6pbRUVpXBGNO0BQR6dHaXRJDjgWOinbJvxdHYRElhRl1FlNEstgAeg5iQtHBJgIRvgtXOIwYBCADDWa7j5aSoXHxtNx4XFNzL8SFfDUV2ftAww4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770273736; c=relaxed/simple; bh=8p1L4c7q+qqobr0mHs++uw+6Q3RKYNO2+2QTIxOsrlk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AxRAzqCS0Nvek3A2MOFbUi3Zy4lVju7YWfnI5FTA7XJSxd9+oxBzVjXaH4DddgHXj8mY74qIuehh5vJbM1R737jUlSnTt/1aHg6czHIuuoaLqQz+x828L5m5B9CBabDvwIP2CfpDpwpPl99RQujuFLwosIg7pOXJRVC5nXqWUd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=c8RMom91; arc=none smtp.client-ip=95.215.58.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="c8RMom91" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770273734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=js+glbFQ6NOluD+9//taqCS4F5wkxgegpkP/IXnUGD0=; b=c8RMom91EzVo3VCYHJWlVP6APXffYVO40BgLxj1c8LFAFPuxRRrJj14o7ViZD8N4JcfA97 uGsNsuXEQWWedGnb54Ik2k8hspEf2dKZyS8Xmnr0ICO6RWEfenvlOscqJtzhzph/vB7LIq 0OdxHLTyZaUAVH2U+w4lwgurpSHufvg= From: Gang Yan To: mptcp@lists.linux.dev, pabeni@redhat.com Cc: Gang Yan , Geliang Tang Subject: [Patch mptcp-net 3/3] mptcp: fix stall because of data_ready Date: Thu, 5 Feb 2026 14:41:31 +0800 Message-ID: In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Gang Yan This patch fixes the second type of backlog_list stall issue that occurs when the data_ready callback attempts to trigger data transfer. The issue reproduces at approximately a 20% rate (once every five runs) when running multi_chunk.sh tests. The stall occurs under the following conditions: 1. A large amount of out-of-order (OFO) data causes sk_rmem_alloc to exceed sk_rcvbuf 2. The skb matching the current ack_seq is not present in backlog_list 3. Data reception relies on data_ready callback notification In this scenario, the data_ready callback (via mptcp_data_ready() -> sk->sk_data_ready()) attempts to trigger data movement, but __mptcp_move_skbs_from_subflow() repeatedly moves the ack_seq skb into backlog_list and returns false: ''' [ 144.961282][ C0] MPTCP: msk->ack_seq:3442119990924456661, map_seq:344= 2119990924456661, offset:0, fin:0 [ 144.961293][ C0] MPTCP: [MPTCP_BACKLOG] #0 map_seq=3D3442119990924655= 746 end_seq=3D3442119990924660542 len=3D4796 [ 144.962310][ C0] MPTCP: [MPTCP_BACKLOG] #1 map_seq=3D3442119990924491= 850 end_seq=3D3442119990924500364 len=3D8514 [ 144.962783][ C0] MPTCP: [MPTCP_BACKLOG] #2 map_seq=3D3442119990924660= 542 end_seq=3D3442119990924726001 len=3D65459 [ 144.963260][ C0] MPTCP: [MPTCP_BACKLOG] #3 map_seq=3D3442119990924508= 114 end_seq=3D3442119990924514971 len=3D6857 [ 144.963729][ C0] MPTCP: [MPTCP_BACKLOG] #4 map_seq=3D3442119990924726= 001 end_seq=3D3442119990924731093 len=3D5092 [ 144.964193][ C0] MPTCP: [MPTCP_BACKLOG] #5 map_seq=3D3442119990924456= 661 end_seq=3D3442119990924464310 len=3D7649 [ 144.964651][ C0] MPTCP: [MPTCP_BACKLOG] #6 map_seq=3D3442119990924456= 661 end_seq=3D3442119990924464310 len=3D7649 [ 144.965164][ C0] MPTCP: [MPTCP_BACKLOG] #7 map_seq=3D3442119990924456= 661 end_seq=3D3442119990924464310 len=3D7649 [ 144.965711][ C0] MPTCP: [MPTCP_BACKLOG] #8 map_seq=3D3442119990924456= 661 end_seq=3D3442119990924464310 len=3D7649 [ 144.966260][ C0] MPTCP: [MPTCP_BACKLOG] #9 map_seq=3D3442119990924456= 661 end_seq=3D3442119990924464310 len=3D7649 [ 144.966804][ C0] MPTCP: [MPTCP_BACKLOG] #10 map_seq=3D344211999092445= 6661 end_seq=3D3442119990924464310 len=3D7649 [ 144.967308][ C0] MPTCP: [MPTCP_BACKLOG] #11 map_seq=3D344211999092445= 6661 end_seq=3D3442119990924464310 len=3D7649 [ 144.967793][ C0] MPTCP: [MPTCP_BACKLOG] #12 map_seq=3D344211999092445= 6661 end_seq=3D3442119990924464310 len=3D7649 ... ''' The fix adds a check for an empty receive queue in addition to the rcvbuf comparison. When the receive queue is empty, skbs should still be moved to prevent the stall. With this patch, all mptcp_tls tests pass successfully. Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Gang Yan --- net/mptcp/protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index b6bafc37eea4..054aa72c9aa6 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -739,7 +739,8 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp= _sock *msk, =20 mptcp_init_skb(ssk, skb, offset, len); =20 - if (own_msk && sk_rmem_alloc_get(sk) < sk->sk_rcvbuf) { + if (own_msk && (sk_rmem_alloc_get(sk) < sk->sk_rcvbuf || + skb_queue_empty(&sk->sk_receive_queue))) { mptcp_subflow_lend_fwdmem(subflow, skb); ret |=3D __mptcp_move_skb(sk, skb); } else { --=20 2.43.0