mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 15:15:02 +07:00
01cacb00b3
Expose a new netlink family to userspace to control the PM, setting: - list of local addresses to be signalled. - list of local addresses used to created subflows. - maximum number of add_addr option to react When the msk is fully established, the PM netlink attempts to announce the 'signal' list via the ADD_ADDR option. Since we currently lack the ADD_ADDR echo (and related event) only the first addr is sent. After exhausting the 'announce' list, the PM tries to create subflow for each addr in 'local' list, waiting for each connection to be completed before attempting the next one. Idea is to add an additional PM hook for ADD_ADDR echo, to allow the PM netlink announcing multiple addresses, in sequence. Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
90 lines
2.2 KiB
C
90 lines
2.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
|
#ifndef _UAPI_MPTCP_H
|
|
#define _UAPI_MPTCP_H
|
|
|
|
#include <linux/const.h>
|
|
#include <linux/types.h>
|
|
|
|
#define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0)
|
|
#define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1)
|
|
#define MPTCP_SUBFLOW_FLAG_JOIN_REM _BITUL(2)
|
|
#define MPTCP_SUBFLOW_FLAG_JOIN_LOC _BITUL(3)
|
|
#define MPTCP_SUBFLOW_FLAG_BKUP_REM _BITUL(4)
|
|
#define MPTCP_SUBFLOW_FLAG_BKUP_LOC _BITUL(5)
|
|
#define MPTCP_SUBFLOW_FLAG_FULLY_ESTABLISHED _BITUL(6)
|
|
#define MPTCP_SUBFLOW_FLAG_CONNECTED _BITUL(7)
|
|
#define MPTCP_SUBFLOW_FLAG_MAPVALID _BITUL(8)
|
|
|
|
enum {
|
|
MPTCP_SUBFLOW_ATTR_UNSPEC,
|
|
MPTCP_SUBFLOW_ATTR_TOKEN_REM,
|
|
MPTCP_SUBFLOW_ATTR_TOKEN_LOC,
|
|
MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ,
|
|
MPTCP_SUBFLOW_ATTR_MAP_SEQ,
|
|
MPTCP_SUBFLOW_ATTR_MAP_SFSEQ,
|
|
MPTCP_SUBFLOW_ATTR_SSN_OFFSET,
|
|
MPTCP_SUBFLOW_ATTR_MAP_DATALEN,
|
|
MPTCP_SUBFLOW_ATTR_FLAGS,
|
|
MPTCP_SUBFLOW_ATTR_ID_REM,
|
|
MPTCP_SUBFLOW_ATTR_ID_LOC,
|
|
MPTCP_SUBFLOW_ATTR_PAD,
|
|
__MPTCP_SUBFLOW_ATTR_MAX
|
|
};
|
|
|
|
#define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1)
|
|
|
|
/* netlink interface */
|
|
#define MPTCP_PM_NAME "mptcp_pm"
|
|
#define MPTCP_PM_CMD_GRP_NAME "mptcp_pm_cmds"
|
|
#define MPTCP_PM_VER 0x1
|
|
|
|
/*
|
|
* ATTR types defined for MPTCP
|
|
*/
|
|
enum {
|
|
MPTCP_PM_ATTR_UNSPEC,
|
|
|
|
MPTCP_PM_ATTR_ADDR, /* nested address */
|
|
MPTCP_PM_ATTR_RCV_ADD_ADDRS, /* u32 */
|
|
MPTCP_PM_ATTR_SUBFLOWS, /* u32 */
|
|
|
|
__MPTCP_PM_ATTR_MAX
|
|
};
|
|
|
|
#define MPTCP_PM_ATTR_MAX (__MPTCP_PM_ATTR_MAX - 1)
|
|
|
|
enum {
|
|
MPTCP_PM_ADDR_ATTR_UNSPEC,
|
|
|
|
MPTCP_PM_ADDR_ATTR_FAMILY, /* u16 */
|
|
MPTCP_PM_ADDR_ATTR_ID, /* u8 */
|
|
MPTCP_PM_ADDR_ATTR_ADDR4, /* struct in_addr */
|
|
MPTCP_PM_ADDR_ATTR_ADDR6, /* struct in6_addr */
|
|
MPTCP_PM_ADDR_ATTR_PORT, /* u16 */
|
|
MPTCP_PM_ADDR_ATTR_FLAGS, /* u32 */
|
|
MPTCP_PM_ADDR_ATTR_IF_IDX, /* s32 */
|
|
|
|
__MPTCP_PM_ADDR_ATTR_MAX
|
|
};
|
|
|
|
#define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1)
|
|
|
|
#define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0)
|
|
#define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1)
|
|
#define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2)
|
|
|
|
enum {
|
|
MPTCP_PM_CMD_UNSPEC,
|
|
|
|
MPTCP_PM_CMD_ADD_ADDR,
|
|
MPTCP_PM_CMD_DEL_ADDR,
|
|
MPTCP_PM_CMD_GET_ADDR,
|
|
MPTCP_PM_CMD_FLUSH_ADDRS,
|
|
MPTCP_PM_CMD_SET_LIMITS,
|
|
MPTCP_PM_CMD_GET_LIMITS,
|
|
|
|
__MPTCP_PM_CMD_AFTER_LAST
|
|
};
|
|
|
|
#endif /* _UAPI_MPTCP_H */
|