summaryrefslogtreecommitdiffstats
path: root/net/mptcp/options.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2023-06-20 18:30:14 +0200
committerJakub Kicinski <kuba@kernel.org>2023-06-22 07:45:57 +0200
commitc026d33b8f5081969503e322ea30d7c1a6b17dda (patch)
tree58a9d188661e53dea6e84460e1c6a822f6d529a9 /net/mptcp/options.c
parentnet: ena: Fix rst format issues in readme (diff)
downloadlinux-c026d33b8f5081969503e322ea30d7c1a6b17dda.tar.xz
linux-c026d33b8f5081969503e322ea30d7c1a6b17dda.zip
mptcp: move snd_una update earlier for fallback socket
That will avoid an unneeded conditional in both the fast-path and in the fallback case and will simplify a bit the next patch. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/options.c')
-rw-r--r--net/mptcp/options.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 8a8083207be4..4bdcd2b326bd 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1119,6 +1119,12 @@ bool mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
mptcp_data_lock(subflow->conn);
if (sk_stream_memory_free(sk))
__mptcp_check_push(subflow->conn, sk);
+
+ /* on fallback we just need to ignore the msk-level snd_una, as
+ * this is really plain TCP
+ */
+ msk->snd_una = READ_ONCE(msk->snd_nxt);
+
__mptcp_data_acked(subflow->conn);
mptcp_data_unlock(subflow->conn);
return true;