selftests: forwarding: gre_multipath: Drop IPv6 tests
[linux-2.6-block.git] / include / uapi / linux / smc_diag.h
CommitLineData
6f52b16c 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
f16a7dd5
UB
2#ifndef _UAPI_SMC_DIAG_H_
3#define _UAPI_SMC_DIAG_H_
4
5#include <linux/types.h>
6#include <linux/inet_diag.h>
ea6819e1 7#include <rdma/ib_user_verbs.h>
f16a7dd5
UB
8
9/* Request structure */
10struct smc_diag_req {
11 __u8 diag_family;
12 __u8 pad[2];
13 __u8 diag_ext; /* Query extended information */
14 struct inet_diag_sockid id;
15};
16
17/* Base info structure. It contains socket identity (addrs/ports/cookie) based
18 * on the internal clcsock, and more SMC-related socket data
19 */
20struct smc_diag_msg {
21 __u8 diag_family;
22 __u8 diag_state;
23 __u8 diag_fallback;
24 __u8 diag_shutdown;
25 struct inet_diag_sockid id;
26
27 __u32 diag_uid;
28 __u64 diag_inode;
29};
30
31/* Extensions */
32
33enum {
34 SMC_DIAG_NONE,
35 SMC_DIAG_CONNINFO,
36 SMC_DIAG_LGRINFO,
37 SMC_DIAG_SHUTDOWN,
4b1b7d3b 38 SMC_DIAG_DMBINFO,
f16a7dd5
UB
39 __SMC_DIAG_MAX,
40};
41
42#define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
43
44/* SMC_DIAG_CONNINFO */
45
46struct smc_diag_cursor {
47 __u16 reserved;
48 __u16 wrap;
49 __u32 count;
50};
51
52struct smc_diag_conninfo {
53 __u32 token; /* unique connection id */
54 __u32 sndbuf_size; /* size of send buffer */
55 __u32 rmbe_size; /* size of RMB element */
56 __u32 peer_rmbe_size; /* size of peer RMB element */
57 /* local RMB element cursors */
58 struct smc_diag_cursor rx_prod; /* received producer cursor */
59 struct smc_diag_cursor rx_cons; /* received consumer cursor */
60 /* peer RMB element cursors */
61 struct smc_diag_cursor tx_prod; /* sent producer cursor */
62 struct smc_diag_cursor tx_cons; /* sent consumer cursor */
63 __u8 rx_prod_flags; /* received producer flags */
64 __u8 rx_conn_state_flags; /* recvd connection flags*/
65 __u8 tx_prod_flags; /* sent producer flags */
66 __u8 tx_conn_state_flags; /* sent connection flags*/
67 /* send buffer cursors */
68 struct smc_diag_cursor tx_prep; /* prepared to be sent cursor */
69 struct smc_diag_cursor tx_sent; /* sent cursor */
70 struct smc_diag_cursor tx_fin; /* confirmed sent cursor */
71};
72
73/* SMC_DIAG_LINKINFO */
74
75struct smc_diag_linkinfo {
76 __u8 link_id; /* link identifier */
77 __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
78 __u8 ibport; /* RDMA device port number */
79 __u8 gid[40]; /* local GID */
80 __u8 peer_gid[40]; /* peer GID */
81};
82
83struct smc_diag_lgrinfo {
84 struct smc_diag_linkinfo lnk[1];
85 __u8 role;
86};
4b1b7d3b
HW
87
88struct smcd_diag_dmbinfo { /* SMC-D Socket internals */
89 __u32 linkid; /* Link identifier */
90 __u64 peer_gid; /* Peer GID */
91 __u64 my_gid; /* My GID */
92 __u64 token; /* Token of DMB */
93 __u64 peer_token; /* Token of remote DMBE */
94};
95
f16a7dd5 96#endif /* _UAPI_SMC_DIAG_H_ */