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
119119 SMC_NLA_LGR_R_CONNS_NUM, /* u32 */
120120 SMC_NLA_LGR_R_V2_COMMON, /* nest */
121121 SMC_NLA_LGR_R_V2, /* nest */
122+ SMC_NLA_LGR_R_NET_COOKIE, /* u64 */
123+ SMC_NLA_LGR_R_PAD, /* flag */
122124 __SMC_NLA_LGR_R_MAX,
123125 SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1
124126 };
include/uapi/linux/smc_diag.h+6−5
@@ -84,11 +84,12 @@ struct smc_diag_conninfo { · 83 unmodified lines
8484 /* SMC_DIAG_LINKINFO */
8585
8686 struct smc_diag_linkinfo {
87− __u8 link_id; /* link identifier */
88− __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
89− __u8 ibport; /* RDMA device port number */
90− __u8 gid[40]; /* local GID */
91− __u8 peer_gid[40]; /* peer GID */
87+ __u8 link_id; /* link identifier */
88+ __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
89+ __u8 ibport; /* RDMA device port number */
90+ __u8 gid[40]; /* local GID */
91+ __u8 peer_gid[40]; /* peer GID */
92+ __aligned_u64 net_cookie; /* RDMA device net namespace */
9293 };
9394
9495 struct smc_diag_lgrinfo {