summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGuvenc Gulce <guvenc@linux.ibm.com>2020-12-01 22:20:48 +0300
committerJakub Kicinski <kuba@kernel.org>2020-12-02 04:56:13 +0300
commitaaf95523d5824ebc2c8c185a2de51063a750c446 (patch)
treed41ca8f44a2fcc5fbef0a6d18fd1a3d65ef79057 /include
parent8f9dde4bf230f5c54a24c42a989dd9d88ec95695 (diff)
downloadlinux-aaf95523d5824ebc2c8c185a2de51063a750c446.tar.xz
net/smc: Add support for obtaining SMCD device list
Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/smc.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/uapi/linux/smc.h b/include/uapi/linux/smc.h
index 707e8af4f0c8..3cb40ab049d9 100644
--- a/include/uapi/linux/smc.h
+++ b/include/uapi/linux/smc.h
@@ -37,12 +37,15 @@ enum { /* SMC PNET Table commands */
#define SMC_GENL_FAMILY_NAME "SMC_GEN_NETLINK"
#define SMC_GENL_FAMILY_VERSION 1
+#define SMC_PCI_ID_STR_LEN 16 /* Max length of pci id string */
+
/* SMC_GENL_FAMILY commands */
enum {
SMC_NETLINK_GET_SYS_INFO = 1,
SMC_NETLINK_GET_LGR_SMCR,
SMC_NETLINK_GET_LINK_SMCR,
SMC_NETLINK_GET_LGR_SMCD,
+ SMC_NETLINK_GET_DEV_SMCD,
};
/* SMC_GENL_FAMILY top level attributes */
@@ -52,6 +55,7 @@ enum {
SMC_GEN_LGR_SMCR, /* nest */
SMC_GEN_LINK_SMCR, /* nest */
SMC_GEN_LGR_SMCD, /* nest */
+ SMC_GEN_DEV_SMCD, /* nest */
__SMC_GEN_MAX,
SMC_GEN_MAX = __SMC_GEN_MAX - 1
};
@@ -122,4 +126,28 @@ enum {
__SMC_NLA_LGR_D_MAX,
SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1
};
+
+/* SMC_NLA_DEV_PORT attributes */
+enum {
+ SMC_NLA_DEV_PORT_UNSPEC,
+ SMC_NLA_DEV_PORT_PNET_USR, /* u8 */
+ SMC_NLA_DEV_PORT_PNETID, /* string */
+ __SMC_NLA_DEV_PORT_MAX,
+ SMC_NLA_DEV_PORT_MAX = __SMC_NLA_DEV_PORT_MAX - 1
+};
+
+/* SMC_GEN_DEV_SMCD attributes */
+enum {
+ SMC_NLA_DEV_UNSPEC,
+ SMC_NLA_DEV_USE_CNT, /* u32 */
+ SMC_NLA_DEV_IS_CRIT, /* u8 */
+ SMC_NLA_DEV_PCI_FID, /* u32 */
+ SMC_NLA_DEV_PCI_CHID, /* u16 */
+ SMC_NLA_DEV_PCI_VENDOR, /* u16 */
+ SMC_NLA_DEV_PCI_DEVICE, /* u16 */
+ SMC_NLA_DEV_PCI_ID, /* string */
+ SMC_NLA_DEV_PORT, /* nest */
+ __SMC_NLA_DEV_MAX,
+ SMC_NLA_DEV_MAX = __SMC_NLA_DEV_MAX - 1
+};
#endif /* _UAPI_LINUX_SMC_H */