mptcp: pm: don't try to create sf if alloc failed
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Wed, 31 Jul 2024 11:05:56 +0000 (13:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 2 Aug 2024 01:24:49 +0000 (18:24 -0700)
commitcd7c957f936f8cb80d03e5152f4013aae65bd986
treee0fb8d80ee6b13db5ffd8add6f7238019dd3bceb
parentc95eb32ced823a00be62202b43966b07b2f20b7f
mptcp: pm: don't try to create sf if alloc failed

It sounds better to avoid wasting cycles and / or put extreme memory
pressure on the system by trying to create new subflows if it was not
possible to add a new item in the announce list.

While at it, a warning is now printed if the entry was already in the
list as it should not happen with the in-kernel path-manager. With this
PM, mptcp_pm_alloc_anno_list() should only fail in case of memory
pressure.

Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink")
Cc: stable@vger.kernel.org
Suggested-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/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-4-c8a9b036493b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_netlink.c