mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 23:36:42 +07:00
6eec177461
Add functionality to enable the port mapper on the passive side to provide to its clients the actual (non-mapped) ip/tcp address information of the connecting peer 1) Adding remote_info_cb() to process the address info of the connecting peer The address info is provided by the user space port mapper service when the connection is initiated by the peer 2) Adding a hash list to store the remote address info 3) Adding functionality to add/remove the remote address info After the info has been provided to the port mapper client, it is removed from the hash list Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
133 lines
2.4 KiB
C
133 lines
2.4 KiB
C
#ifndef _UAPI_RDMA_NETLINK_H
|
|
#define _UAPI_RDMA_NETLINK_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
enum {
|
|
RDMA_NL_RDMA_CM = 1,
|
|
RDMA_NL_NES,
|
|
RDMA_NL_C4IW,
|
|
RDMA_NL_NUM_CLIENTS
|
|
};
|
|
|
|
enum {
|
|
RDMA_NL_GROUP_CM = 1,
|
|
RDMA_NL_GROUP_IWPM,
|
|
RDMA_NL_NUM_GROUPS
|
|
};
|
|
|
|
#define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10)
|
|
#define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
|
|
#define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op)
|
|
|
|
enum {
|
|
RDMA_NL_RDMA_CM_ID_STATS = 0,
|
|
RDMA_NL_RDMA_CM_NUM_OPS
|
|
};
|
|
|
|
enum {
|
|
RDMA_NL_RDMA_CM_ATTR_SRC_ADDR = 1,
|
|
RDMA_NL_RDMA_CM_ATTR_DST_ADDR,
|
|
RDMA_NL_RDMA_CM_NUM_ATTR,
|
|
};
|
|
|
|
/* iwarp port mapper op-codes */
|
|
enum {
|
|
RDMA_NL_IWPM_REG_PID = 0,
|
|
RDMA_NL_IWPM_ADD_MAPPING,
|
|
RDMA_NL_IWPM_QUERY_MAPPING,
|
|
RDMA_NL_IWPM_REMOVE_MAPPING,
|
|
RDMA_NL_IWPM_REMOTE_INFO,
|
|
RDMA_NL_IWPM_HANDLE_ERR,
|
|
RDMA_NL_IWPM_MAPINFO,
|
|
RDMA_NL_IWPM_MAPINFO_NUM,
|
|
RDMA_NL_IWPM_NUM_OPS
|
|
};
|
|
|
|
struct rdma_cm_id_stats {
|
|
__u32 qp_num;
|
|
__u32 bound_dev_if;
|
|
__u32 port_space;
|
|
__s32 pid;
|
|
__u8 cm_state;
|
|
__u8 node_type;
|
|
__u8 port_num;
|
|
__u8 qp_type;
|
|
};
|
|
|
|
enum {
|
|
IWPM_NLA_REG_PID_UNSPEC = 0,
|
|
IWPM_NLA_REG_PID_SEQ,
|
|
IWPM_NLA_REG_IF_NAME,
|
|
IWPM_NLA_REG_IBDEV_NAME,
|
|
IWPM_NLA_REG_ULIB_NAME,
|
|
IWPM_NLA_REG_PID_MAX
|
|
};
|
|
|
|
enum {
|
|
IWPM_NLA_RREG_PID_UNSPEC = 0,
|
|
IWPM_NLA_RREG_PID_SEQ,
|
|
IWPM_NLA_RREG_IBDEV_NAME,
|
|
IWPM_NLA_RREG_ULIB_NAME,
|
|
IWPM_NLA_RREG_ULIB_VER,
|
|
IWPM_NLA_RREG_PID_ERR,
|
|
IWPM_NLA_RREG_PID_MAX
|
|
|
|
};
|
|
|
|
enum {
|
|
IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0,
|
|
IWPM_NLA_MANAGE_MAPPING_SEQ,
|
|
IWPM_NLA_MANAGE_ADDR,
|
|
IWPM_NLA_MANAGE_MAPPED_LOC_ADDR,
|
|
IWPM_NLA_RMANAGE_MAPPING_ERR,
|
|
IWPM_NLA_RMANAGE_MAPPING_MAX
|
|
};
|
|
|
|
#define IWPM_NLA_MANAGE_MAPPING_MAX 3
|
|
#define IWPM_NLA_QUERY_MAPPING_MAX 4
|
|
#define IWPM_NLA_MAPINFO_SEND_MAX 3
|
|
|
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