mptcp: micro-optimize __mptcp_move_skb()
authorPaolo Abeni <pabeni@redhat.com>
Tue, 18 Feb 2025 18:36:18 +0000 (19:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Feb 2025 03:05:29 +0000 (19:05 -0800)
commite0ca4057e0ecd4b10f27892fe6f1ac2a7fd25ab4
tree36219ec22b92aa151525292a16cc1ef06d4c3b3c
parent51fe9cb9213e18c4968385482c7ed20c0b1b21d3
mptcp: micro-optimize __mptcp_move_skb()

After the RX path refactor the mentioned function is expected to run
frequently, let's optimize it a bit.

Scan for ready subflow from the last processed one, and stop after
traversing the list once or reaching the msk memory limit - instead of
looking for dubious per-subflow conditions.
Also re-order the memory limit checks, to avoid duplicate tests.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250218-net-next-mptcp-rx-path-refactor-v1-7-4a47d90d7998@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c
net/mptcp/protocol.h