mptcp: Add a member to mptcp_pm_data to track kernel vs userspace mode
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2079368 Upstream Status: net-next.git commit d85a8fde71e2 commit d85a8fde71e245981180698a5a662598682b7524 Author: Mat Martineau <mathew.j.martineau@linux.intel.com> Date: Wed Apr 27 15:49:58 2022 -0700 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> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
This commit is contained in:
parent
d01b15acf3
commit
4fc2da628e
|
@ -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));
|
||||
|
|
|
@ -184,6 +184,14 @@ enum mptcp_pm_status {
|
|||
*/
|
||||
};
|
||||
|
||||
enum mptcp_pm_type {
|
||||
MPTCP_PM_TYPE_KERNEL = 0,
|
||||
MPTCP_PM_TYPE_USERSPACE,
|
||||
|
||||
__MPTCP_PM_TYPE_NR,
|
||||
__MPTCP_PM_TYPE_MAX = __MPTCP_PM_TYPE_NR - 1,
|
||||
};
|
||||
|
||||
/* Status bits below MPTCP_PM_ALREADY_ESTABLISHED need pm worker actions */
|
||||
#define MPTCP_PM_WORK_MASK ((1 << MPTCP_PM_ALREADY_ESTABLISHED) - 1)
|
||||
|
||||
|
@ -212,6 +220,7 @@ struct mptcp_pm_data {
|
|||
u8 add_addr_signaled;
|
||||
u8 add_addr_accepted;
|
||||
u8 local_addr_used;
|
||||
u8 pm_type;
|
||||
u8 subflows;
|
||||
u8 status;
|
||||
DECLARE_BITMAP(id_avail_bitmap, MPTCP_PM_MAX_ADDR_ID + 1);
|
||||
|
|
Loading…
Reference in New Issue