]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mptcp: drop __mptcp_fastopen_gen_msk_ackseq()
authorPaolo Abeni <pabeni@redhat.com>
Tue, 18 Feb 2025 18:36:13 +0000 (19:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Feb 2025 03:05:28 +0000 (19:05 -0800)
commitf03afb3aeb9d81f6c5ab728a61a040012923e3b3
tree7efbccc5e354f88ec8c40306ce3474d324ddc67a
parentc3349a22c2002947d29a98a77bfb36d97cfbfac1
mptcp: drop __mptcp_fastopen_gen_msk_ackseq()

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>
net/mptcp/fastopen.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c