1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI_SMC_DIAG_H_
3 #define _UAPI_SMC_DIAG_H_
5 #include <linux/types.h>
6 #include <linux/inet_diag.h>
7 #include <rdma/ib_user_verbs.h>
9 /* Request structure */
13 __u8 diag_ext
; /* Query extended information */
14 struct inet_diag_sockid id
;
17 /* Base info structure. It contains socket identity (addrs/ports/cookie) based
18 * on the internal clcsock, and more SMC-related socket data
25 struct inet_diag_sockid id
;
41 #define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
43 /* SMC_DIAG_CONNINFO */
45 struct smc_diag_cursor
{
51 struct smc_diag_conninfo
{
52 __u32 token
; /* unique connection id */
53 __u32 sndbuf_size
; /* size of send buffer */
54 __u32 rmbe_size
; /* size of RMB element */
55 __u32 peer_rmbe_size
; /* size of peer RMB element */
56 /* local RMB element cursors */
57 struct smc_diag_cursor rx_prod
; /* received producer cursor */
58 struct smc_diag_cursor rx_cons
; /* received consumer cursor */
59 /* peer RMB element cursors */
60 struct smc_diag_cursor tx_prod
; /* sent producer cursor */
61 struct smc_diag_cursor tx_cons
; /* sent consumer cursor */
62 __u8 rx_prod_flags
; /* received producer flags */
63 __u8 rx_conn_state_flags
; /* recvd connection flags*/
64 __u8 tx_prod_flags
; /* sent producer flags */
65 __u8 tx_conn_state_flags
; /* sent connection flags*/
66 /* send buffer cursors */
67 struct smc_diag_cursor tx_prep
; /* prepared to be sent cursor */
68 struct smc_diag_cursor tx_sent
; /* sent cursor */
69 struct smc_diag_cursor tx_fin
; /* confirmed sent cursor */
72 /* SMC_DIAG_LINKINFO */
74 struct smc_diag_linkinfo
{
75 __u8 link_id
; /* link identifier */
76 __u8 ibname
[IB_DEVICE_NAME_MAX
]; /* name of the RDMA device */
77 __u8 ibport
; /* RDMA device port number */
78 __u8 gid
[40]; /* local GID */
79 __u8 peer_gid
[40]; /* peer GID */
82 struct smc_diag_lgrinfo
{
83 struct smc_diag_linkinfo lnk
[1];
86 #endif /* _UAPI_SMC_DIAG_H_ */