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
41enum {41enum {
42 SMC_NETLINK_GET_SYS_INFO = 1,42 SMC_NETLINK_GET_SYS_INFO = 1,
43 SMC_NETLINK_GET_LGR_SMCR,43 SMC_NETLINK_GET_LGR_SMCR,
44 SMC_NETLINK_GET_LINK_SMCR,
44};45};
45 46
46/* SMC_GENL_FAMILY top level attributes */47/* SMC_GENL_FAMILY top level attributes */
@@ -48,6 +49,7 @@ enum { · 1 unmodified line
48 SMC_GEN_UNSPEC,49 SMC_GEN_UNSPEC,
49 SMC_GEN_SYS_INFO, /* nest */50 SMC_GEN_SYS_INFO, /* nest */
50 SMC_GEN_LGR_SMCR, /* nest */51 SMC_GEN_LGR_SMCR, /* nest */
52 SMC_GEN_LINK_SMCR, /* nest */
51 __SMC_GEN_MAX,53 __SMC_GEN_MAX,
52 SMC_GEN_MAX = __SMC_GEN_MAX - 154 SMC_GEN_MAX = __SMC_GEN_MAX - 1
53};55};
@@ -77,4 +79,20 @@ enum { · 23 unmodified lines
77 SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 179 SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1
78};80};
79 81
82/* SMC_GEN_LINK_SMCR attributes */
83enum {
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};
80#endif /* _UAPI_LINUX_SMC_H */98#endif /* _UAPI_LINUX_SMC_H */