mptcp: netlink: allow userspace-driven subflow establishment

This allows userspace to tell kernel to add a new subflow to an existing
mptcp connection.

Userspace provides the token to identify the mptcp-level connection
that needs a change in active subflows and the local and remote
addresses of the new or the to-be-removed subflow.

MPTCP_PM_CMD_SUBFLOW_CREATE requires the following parameters:
{ token, { loc_id, family, loc_addr4 | loc_addr6 }, { family, rem_addr4 |
rem_addr6, rem_port }

MPTCP_PM_CMD_SUBFLOW_DESTROY requires the following parameters:
{ token, { family, loc_addr4 | loc_addr6, loc_port }, { family, rem_addr4 |
rem_addr6, rem_port }

Acked-by: Paolo Abeni <pabeni@redhat.com>
Co-developed-by: Kishen Maloor <kishen.maloor@intel.com>
Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Westphal
2022-05-03 19:38:56 -07:00
committed by David S. Miller
parent ecd2a77d67
commit 702c2f646d
4 changed files with 214 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ enum {
MPTCP_PM_ATTR_SUBFLOWS, /* u32 */
MPTCP_PM_ATTR_TOKEN, /* u32 */
MPTCP_PM_ATTR_LOC_ID, /* u8 */
MPTCP_PM_ATTR_ADDR_REMOTE, /* nested address */
__MPTCP_PM_ATTR_MAX
};
@@ -97,6 +98,8 @@ enum {
MPTCP_PM_CMD_SET_FLAGS,
MPTCP_PM_CMD_ANNOUNCE,
MPTCP_PM_CMD_REMOVE,
MPTCP_PM_CMD_SUBFLOW_CREATE,
MPTCP_PM_CMD_SUBFLOW_DESTROY,
__MPTCP_PM_CMD_AFTER_LAST
};