]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mptcp: drop __mptcp_fastopen_gen_msk_ackseq()
authorPaolo Abeni <pabeni@redhat.com>
Mon, 18 May 2026 13:05:08 +0000 (09:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 May 2026 11:03:35 +0000 (13:03 +0200)
commit11fdbd033e4ce18b3039efbaf6f53d7ffa8a7466
tree071ea648818624cd3bf646ffcdede80bbf7dc093
parent7d7c9f0fcd19c4d2f0164347c58d49cafa961b72
mptcp: drop __mptcp_fastopen_gen_msk_ackseq()

[ Upstream commit f03afb3aeb9d81f6c5ab728a61a040012923e3b3 ]

When we will move the whole RX path under the msk socket lock, updating
the already queued skb for passive fastopen socket at 3rd ack time will
be extremely painful and race prone

The map_seq for already enqueued skbs is used only to allow correct
coalescing with later data; preventing collapsing to the first skb of
a fastopen connect we can completely remove the
__mptcp_fastopen_gen_msk_ackseq() helper.

Before dropping this helper, a new item had to be added to the
mptcp_skb_cb structure. Because this item will be frequently tested in
the fast path -- almost on every packet -- and because there is free
space there, a single byte is used instead of a bitfield. This micro
optimisation slightly reduces the number of CPU operations to do the
associated check.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250218-net-next-mptcp-rx-path-refactor-v1-2-4a47d90d7998@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 6254a16d6f0c ("mptcp: fix rx timestamp corruption on fastopen")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/fastopen.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c