summaryrefslogtreecommitdiff
path: root/net/mptcp/pm.c
diff options
context:
space:
mode:
authorMat Martineau <mathew.j.martineau@linux.intel.com>2022-04-27 15:49:58 -0700
committerJakub Kicinski <kuba@kernel.org>2022-04-29 17:25:13 -0700
commitd85a8fde71e245981180698a5a662598682b7524 (patch)
tree487c9c907eb5a92c8c332c97459822c71acd583e /net/mptcp/pm.c
parent9273b9d5799598d35f7a2a2df61b8e29102aeac8 (diff)
mptcp: Add a member to mptcp_pm_data to track kernel vs userspace mode
When adding support for netlink path management commands, the kernel needs to know whether paths are being controlled by the in-kernel path manager or a userspace PM. Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/pm.c')
-rw-r--r--net/mptcp/pm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index 4de90e618be3..f9f1bf4be95e 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -424,6 +424,10 @@ void mptcp_pm_data_reset(struct mptcp_sock *msk)
pm->subflows = 0;
pm->rm_list_tx.nr = 0;
pm->rm_list_rx.nr = 0;
+ WRITE_ONCE(pm->pm_type, MPTCP_PM_TYPE_KERNEL);
+ /* pm->work_pending must be only be set to 'true' when
+ * pm->pm_type is set to MPTCP_PM_TYPE_KERNEL
+ */
WRITE_ONCE(pm->work_pending,
(!!mptcp_pm_get_local_addr_max(msk) && subflows_allowed) ||
!!mptcp_pm_get_add_addr_signal_max(msk));