1 #ifndef _UAPI_SMC_DIAG_H_
2 #define _UAPI_SMC_DIAG_H_
4 #include <linux/types.h>
5 #include <linux/inet_diag.h>
6 #include <rdma/ib_verbs.h>
8 /* Request structure */
12 __u8 diag_ext; /* Query extended information */
13 struct inet_diag_sockid id;
16 /* Base info structure. It contains socket identity (addrs/ports/cookie) based
17 * on the internal clcsock, and more SMC-related socket data
24 struct inet_diag_sockid id;
40 #define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
42 /* SMC_DIAG_CONNINFO */
44 struct smc_diag_cursor {
50 struct smc_diag_conninfo {
51 __u32 token; /* unique connection id */
52 __u32 sndbuf_size; /* size of send buffer */
53 __u32 rmbe_size; /* size of RMB element */
54 __u32 peer_rmbe_size; /* size of peer RMB element */
55 /* local RMB element cursors */
56 struct smc_diag_cursor rx_prod; /* received producer cursor */
57 struct smc_diag_cursor rx_cons; /* received consumer cursor */
58 /* peer RMB element cursors */
59 struct smc_diag_cursor tx_prod; /* sent producer cursor */
60 struct smc_diag_cursor tx_cons; /* sent consumer cursor */
61 __u8 rx_prod_flags; /* received producer flags */
62 __u8 rx_conn_state_flags; /* recvd connection flags*/
63 __u8 tx_prod_flags; /* sent producer flags */
64 __u8 tx_conn_state_flags; /* sent connection flags*/
65 /* send buffer cursors */
66 struct smc_diag_cursor tx_prep; /* prepared to be sent cursor */
67 struct smc_diag_cursor tx_sent; /* sent cursor */
68 struct smc_diag_cursor tx_fin; /* confirmed sent cursor */
71 /* SMC_DIAG_LINKINFO */
73 struct smc_diag_linkinfo {
74 __u8 link_id; /* link identifier */
75 __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
76 __u8 ibport; /* RDMA device port number */
77 __u8 gid[40]; /* local GID */
78 __u8 peer_gid[40]; /* peer GID */
81 struct smc_diag_lgrinfo {
82 struct smc_diag_linkinfo lnk[1];
85 #endif /* _UAPI_SMC_DIAG_H_ */