]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mptcp: pm: exit early with ADD_ADDR echo if possible
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 28 Feb 2025 14:38:39 +0000 (15:38 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Mar 2025 00:57:38 +0000 (16:57 -0800)
commitf0de92479a098ba930506ed2e715a7aad3887ec1
tree020f7be452665126604159b58afe45df8296ca89
parent70c575d5a94f4817d839a2ef1e0a10b1fbd6383e
mptcp: pm: exit early with ADD_ADDR echo if possible

When the userspace PM is used, or when the in-kernel limits are reached,
there will be no need to schedule the PM worker to signal new addresses.
That corresponds to pm->work_pending set to 0.

In this case, an early exit can be done in mptcp_pm_add_addr_echoed()
not to hold the PM lock, and iterate over the announced addresses list,
not to schedule the worker anyway in this case. This is similar to what
is done when a connection or a subflow has been established.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250228-net-next-mptcp-coverage-small-opti-v1-5-f933c4275676@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm.c