• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI_SMC_DIAG_H_
7 #define _UAPI_SMC_DIAG_H_
8 #include <linux/types.h>
9 #include <linux/inet_diag.h>
10 #include <rdma/ib_user_verbs.h>
11 struct smc_diag_req {
12 	__u8	diag_family;
13 	__u8	pad[2];
14 	__u8	diag_ext;
15 	struct inet_diag_sockid	id;
16 };
17 struct smc_diag_msg {
18 	__u8		diag_family;
19 	__u8		diag_state;
20 	union {
21 		__u8	diag_mode;
22 		__u8	diag_fallback;
23 	};
24 	__u8		diag_shutdown;
25 	struct inet_diag_sockid id;
26 	__u32		diag_uid;
27 	__aligned_u64	diag_inode;
28 };
29 enum {
30 	SMC_DIAG_MODE_SMCR,
31 	SMC_DIAG_MODE_FALLBACK_TCP,
32 	SMC_DIAG_MODE_SMCD,
33 };
34 enum {
35 	SMC_DIAG_NONE,
36 	SMC_DIAG_CONNINFO,
37 	SMC_DIAG_LGRINFO,
38 	SMC_DIAG_SHUTDOWN,
39 	SMC_DIAG_DMBINFO,
40 	SMC_DIAG_FALLBACK,
41 	__SMC_DIAG_MAX,
42 };
43 #define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
44 struct smc_diag_cursor {
45 	__u16	reserved;
46 	__u16	wrap;
47 	__u32	count;
48 };
49 struct smc_diag_conninfo {
50 	__u32			token;
51 	__u32			sndbuf_size;
52 	__u32			rmbe_size;
53 	__u32			peer_rmbe_size;
54 
55 	struct smc_diag_cursor	rx_prod;
56 	struct smc_diag_cursor	rx_cons;
57 
58 	struct smc_diag_cursor	tx_prod;
59 	struct smc_diag_cursor	tx_cons;
60 	__u8			rx_prod_flags;
61 	__u8			rx_conn_state_flags;
62 	__u8			tx_prod_flags;
63 	__u8			tx_conn_state_flags;
64 
65 	struct smc_diag_cursor	tx_prep;
66 	struct smc_diag_cursor	tx_sent;
67 	struct smc_diag_cursor	tx_fin;
68 };
69 struct smc_diag_linkinfo {
70 	__u8 link_id;
71 	__u8 ibname[IB_DEVICE_NAME_MAX];
72 	__u8 ibport;
73 	__u8 gid[40];
74 	__u8 peer_gid[40];
75 };
76 struct smc_diag_lgrinfo {
77 	struct smc_diag_linkinfo	lnk[1];
78 	__u8				role;
79 };
80 struct smc_diag_fallback {
81 	__u32 reason;
82 	__u32 peer_diagnosis;
83 };
84 struct smcd_diag_dmbinfo {
85 	__u32		linkid;
86 	__aligned_u64	peer_gid;
87 	__aligned_u64	my_gid;
88 	__aligned_u64	token;
89 	__aligned_u64	peer_token;
90 };
91 #endif
92