History

net/smc: Add netlink net namespace support

This adds net namespace ID to diag of linkgroup, helps us to distinguish different namespaces, and net_cookie is unique in the whole system.

Tony Lu committed 4 years ago

Commit 79d39fc1 parent 0237a3a4 files · +20 −12Browse files

Showing the changes to include/uapi (2 of 4 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/smc.h +2 −0
  2. include/uapi/linux/smc_diag.h +6 −5
include/uapi/linux/smc.h+2−0
@@ -119,6 +119,8 @@ enum { · 118 unmodified lines
119 SMC_NLA_LGR_R_CONNS_NUM, /* u32 */119 SMC_NLA_LGR_R_CONNS_NUM, /* u32 */
120 SMC_NLA_LGR_R_V2_COMMON, /* nest */120 SMC_NLA_LGR_R_V2_COMMON, /* nest */
121 SMC_NLA_LGR_R_V2, /* nest */121 SMC_NLA_LGR_R_V2, /* nest */
122 SMC_NLA_LGR_R_NET_COOKIE, /* u64 */
123 SMC_NLA_LGR_R_PAD, /* flag */
122 __SMC_NLA_LGR_R_MAX,124 __SMC_NLA_LGR_R_MAX,
123 SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1125 SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1
124};126};
include/uapi/linux/smc_diag.h+6−5
@@ -84,11 +84,12 @@ struct smc_diag_conninfo { · 83 unmodified lines
84/* SMC_DIAG_LINKINFO */84/* SMC_DIAG_LINKINFO */
85 85
86struct smc_diag_linkinfo {86struct smc_diag_linkinfo {
87 __u8 link_id; /* link identifier */87 __u8 link_id; /* link identifier */
88 __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */88 __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
89 __u8 ibport; /* RDMA device port number */89 __u8 ibport; /* RDMA device port number */
90 __u8 gid[40]; /* local GID */90 __u8 gid[40]; /* local GID */
91 __u8 peer_gid[40]; /* peer GID */91 __u8 peer_gid[40]; /* peer GID */
92 __aligned_u64 net_cookie; /* RDMA device net namespace */
92};93};
93 94
94struct smc_diag_lgrinfo {95struct smc_diag_lgrinfo {