blob: 30e0fa259922244bf3b23864a9dca44f801fc0fb [file] [log] [blame]
Christopher Ferris525ce912017-07-26 13:12:53 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_SMC_DIAG_H_
20#define _UAPI_SMC_DIAG_H_
21#include <linux/types.h>
22#include <linux/inet_diag.h>
23#include <rdma/ib_user_verbs.h>
24struct smc_diag_req {
25 __u8 diag_family;
26 __u8 pad[2];
27 __u8 diag_ext;
28 struct inet_diag_sockid id;
29};
30struct smc_diag_msg {
31 __u8 diag_family;
32 __u8 diag_state;
Christopher Ferris9ce28842018-10-25 12:11:39 -070033 union {
34 __u8 diag_mode;
35 __u8 diag_fallback;
36 };
Christopher Ferris525ce912017-07-26 13:12:53 -070037 __u8 diag_shutdown;
38 struct inet_diag_sockid id;
39 __u32 diag_uid;
Christopher Ferris9ce28842018-10-25 12:11:39 -070040 __aligned_u64 diag_inode;
41};
42enum {
43 SMC_DIAG_MODE_SMCR,
44 SMC_DIAG_MODE_FALLBACK_TCP,
45 SMC_DIAG_MODE_SMCD,
Christopher Ferris525ce912017-07-26 13:12:53 -070046};
47enum {
48 SMC_DIAG_NONE,
49 SMC_DIAG_CONNINFO,
50 SMC_DIAG_LGRINFO,
51 SMC_DIAG_SHUTDOWN,
Christopher Ferris9ce28842018-10-25 12:11:39 -070052 SMC_DIAG_DMBINFO,
53 SMC_DIAG_FALLBACK,
Christopher Ferris525ce912017-07-26 13:12:53 -070054 __SMC_DIAG_MAX,
55};
56#define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
57struct smc_diag_cursor {
58 __u16 reserved;
59 __u16 wrap;
60 __u32 count;
61};
62struct smc_diag_conninfo {
63 __u32 token;
64 __u32 sndbuf_size;
65 __u32 rmbe_size;
66 __u32 peer_rmbe_size;
67 struct smc_diag_cursor rx_prod;
68 struct smc_diag_cursor rx_cons;
69 struct smc_diag_cursor tx_prod;
70 struct smc_diag_cursor tx_cons;
71 __u8 rx_prod_flags;
72 __u8 rx_conn_state_flags;
73 __u8 tx_prod_flags;
74 __u8 tx_conn_state_flags;
75 struct smc_diag_cursor tx_prep;
76 struct smc_diag_cursor tx_sent;
77 struct smc_diag_cursor tx_fin;
78};
79struct smc_diag_linkinfo {
80 __u8 link_id;
81 __u8 ibname[IB_DEVICE_NAME_MAX];
82 __u8 ibport;
83 __u8 gid[40];
84 __u8 peer_gid[40];
85};
86struct smc_diag_lgrinfo {
87 struct smc_diag_linkinfo lnk[1];
88 __u8 role;
89};
Christopher Ferris9ce28842018-10-25 12:11:39 -070090struct smc_diag_fallback {
91 __u32 reason;
92 __u32 peer_diagnosis;
93};
94struct smcd_diag_dmbinfo {
95 __u32 linkid;
96 __aligned_u64 peer_gid;
97 __aligned_u64 my_gid;
98 __aligned_u64 token;
99 __aligned_u64 peer_token;
100};
Christopher Ferris525ce912017-07-26 13:12:53 -0700101#endif