History

net/smc: Introduce SMCR get link command

Introduce get link command which loops through all available links of all available link groups. It uses the SMC-R linkgroup list as entry point, not the socket list, which makes linkgroup diagnosis possible, in case linkgroup does not contain active connections anymore.

Guvenc Gulce committed 5 years ago

Commit 5a7e09d1 parent e9b8c845 files · +124 −17Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/smc.h+18−0
@@ -41,6 +41,7 @@ enum { /* SMC PNET Table commands */ · 40 unmodified lines
4141 enum {
4242 SMC_NETLINK_GET_SYS_INFO = 1,
4343 SMC_NETLINK_GET_LGR_SMCR,
44+ SMC_NETLINK_GET_LINK_SMCR,
4445 };
4546
4647 /* SMC_GENL_FAMILY top level attributes */
@@ -48,6 +49,7 @@ enum { · 1 unmodified line
4849 SMC_GEN_UNSPEC,
4950 SMC_GEN_SYS_INFO, /* nest */
5051 SMC_GEN_LGR_SMCR, /* nest */
52+ SMC_GEN_LINK_SMCR, /* nest */
5153 __SMC_GEN_MAX,
5254 SMC_GEN_MAX = __SMC_GEN_MAX - 1
5355 };
@@ -77,4 +79,20 @@ enum { · 23 unmodified lines
7779 SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1
7880 };
7981
82+/* SMC_GEN_LINK_SMCR attributes */
83+enum {
84+ SMC_NLA_LINK_UNSPEC,
85+ SMC_NLA_LINK_ID, /* u8 */
86+ SMC_NLA_LINK_IB_DEV, /* string */
87+ SMC_NLA_LINK_IB_PORT, /* u8 */
88+ SMC_NLA_LINK_GID, /* string */
89+ SMC_NLA_LINK_PEER_GID, /* string */
90+ SMC_NLA_LINK_CONN_CNT, /* u32 */
91+ SMC_NLA_LINK_NET_DEV, /* u32 */
92+ SMC_NLA_LINK_UID, /* u32 */
93+ SMC_NLA_LINK_PEER_UID, /* u32 */
94+ SMC_NLA_LINK_STATE, /* u32 */
95+ __SMC_NLA_LINK_MAX,
96+ SMC_NLA_LINK_MAX = __SMC_NLA_LINK_MAX - 1
97+};
8098 #endif /* _UAPI_LINUX_SMC_H */