From: Benjamin Hesmans <benjamin.hesmans@tessares.net>
To: mptcp@lists.linux.dev
Cc: Benjamin Hesmans <benjamin.hesmans@tessares.net>
Subject: [PATCH RFC mptcp-next 08/10] mptcp: allow data that can not be DATA_ACKed
Date: Thu, 8 Sep 2022 15:38:27 +0200 [thread overview]
Message-ID: <20220908133829.3410092-9-benjamin.hesmans@tessares.net> (raw)
In-Reply-To: <20220908133829.3410092-1-benjamin.hesmans@tessares.net>
With TFO, this first bytes are out of the regular MTPCP seq numbers,
hence they can't be DATA_ACKed. The data ack validation can then be
skipped in this case.
Signed-off-by: Benjamin Hesmans <benjamin.hesmans@tessares.net>
---
net/mptcp/subflow.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index c2d1ba21c8c2..ca5b9853eca3 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -1221,6 +1221,14 @@ static bool subflow_check_data_avail(struct sock *ssk)
if (WARN_ON_ONCE(!skb))
goto no_data;
+ /* with TFO, we can have data, but we don't not yet the data ack
+ * because its not part of the MTPCP seq number.
+ */
+ if (unlikely(!READ_ONCE(msk->can_ack)) && TCP_SKB_CB(skb)->is_tfo) {
+ pr_err("%s (%i): can't ack yet, but already got data\n", __func__, __LINE__);
+ goto valid_data;
+ }
+
/* if msk lacks the remote key, this subflow must provide an
* MP_CAPABLE-based mapping
*/
@@ -1240,7 +1248,7 @@ static bool subflow_check_data_avail(struct sock *ssk)
mptcp_subflow_discard_data(ssk, skb, old_ack - ack_seq);
continue;
}
-
+valid_data:
WRITE_ONCE(subflow->data_avail, MPTCP_SUBFLOW_DATA_AVAIL);
break;
}
--
2.25.1
--
Disclaimer: https://www.tessares.net/mail-disclaimer/
<https://www.tessares.net/mail-disclaimer/>
next prev parent reply other threads:[~2022-09-08 13:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 13:38 [PATCH RFC mptcp-next 00/10] Implement TCP_FASTOPEN_CONNECT for mptcp Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 01/10] mptcp: add TCP_FASTOPEN_CONNECT socket option Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 02/10] tcp: export tcp_sendmsg_fastopen Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 03/10] mptcp: handle defer connect in mptcp_sendmsg Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 04/10] mptcp: poll allow write call before actual connect Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 05/10] mptcp: delay mptcp data_ack calculation Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 06/10] mptcp: allow delayed " Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 07/10] mptcp: TFO receive: bypass mapping check Benjamin Hesmans
2022-09-08 13:38 ` Benjamin Hesmans [this message]
2022-09-08 13:38 ` [PATCH RFC mptcp-next 09/10] mptcp: force data_ready Benjamin Hesmans
2022-09-08 13:38 ` [PATCH RFC mptcp-next 10/10] mptcp: test TFO Benjamin Hesmans
2022-09-08 14:10 ` mptcp: test TFO: Build Failure MPTCP CI
2022-09-08 15:40 ` mptcp: test TFO: Tests Results MPTCP CI
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=20220908133829.3410092-9-benjamin.hesmans@tessares.net \
--to=benjamin.hesmans@tessares.net \
--cc=mptcp@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).