blob: be540acb12d19fa947a67e0a4e78e42ce0402490 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris525ce912017-07-26 13:12:53 -07007#ifndef _UAPI_SMC_DIAG_H_
8#define _UAPI_SMC_DIAG_H_
9#include <linux/types.h>
10#include <linux/inet_diag.h>
11#include <rdma/ib_user_verbs.h>
12struct smc_diag_req {
13 __u8 diag_family;
14 __u8 pad[2];
15 __u8 diag_ext;
16 struct inet_diag_sockid id;
17};
18struct smc_diag_msg {
19 __u8 diag_family;
20 __u8 diag_state;
Christopher Ferrisa981e2e2018-10-25 12:11:39 -070021 union {
22 __u8 diag_mode;
23 __u8 diag_fallback;
24 };
Christopher Ferris525ce912017-07-26 13:12:53 -070025 __u8 diag_shutdown;
26 struct inet_diag_sockid id;
27 __u32 diag_uid;
Christopher Ferrisa981e2e2018-10-25 12:11:39 -070028 __aligned_u64 diag_inode;
29};
30enum {
31 SMC_DIAG_MODE_SMCR,
32 SMC_DIAG_MODE_FALLBACK_TCP,
33 SMC_DIAG_MODE_SMCD,
Christopher Ferris525ce912017-07-26 13:12:53 -070034};
35enum {
36 SMC_DIAG_NONE,
37 SMC_DIAG_CONNINFO,
38 SMC_DIAG_LGRINFO,
39 SMC_DIAG_SHUTDOWN,
Christopher Ferrisa981e2e2018-10-25 12:11:39 -070040 SMC_DIAG_DMBINFO,
41 SMC_DIAG_FALLBACK,
Christopher Ferris525ce912017-07-26 13:12:53 -070042 __SMC_DIAG_MAX,
43};
44#define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
45struct smc_diag_cursor {
46 __u16 reserved;
47 __u16 wrap;
48 __u32 count;
49};
50struct smc_diag_conninfo {
51 __u32 token;
52 __u32 sndbuf_size;
53 __u32 rmbe_size;
54 __u32 peer_rmbe_size;
55 struct smc_diag_cursor rx_prod;
56 struct smc_diag_cursor rx_cons;
57 struct smc_diag_cursor tx_prod;
58 struct smc_diag_cursor tx_cons;
59 __u8 rx_prod_flags;
60 __u8 rx_conn_state_flags;
61 __u8 tx_prod_flags;
62 __u8 tx_conn_state_flags;
63 struct smc_diag_cursor tx_prep;
64 struct smc_diag_cursor tx_sent;
65 struct smc_diag_cursor tx_fin;
66};
67struct smc_diag_linkinfo {
68 __u8 link_id;
69 __u8 ibname[IB_DEVICE_NAME_MAX];
70 __u8 ibport;
71 __u8 gid[40];
72 __u8 peer_gid[40];
73};
74struct smc_diag_lgrinfo {
75 struct smc_diag_linkinfo lnk[1];
76 __u8 role;
77};
Christopher Ferrisa981e2e2018-10-25 12:11:39 -070078struct smc_diag_fallback {
79 __u32 reason;
80 __u32 peer_diagnosis;
81};
82struct smcd_diag_dmbinfo {
83 __u32 linkid;
84 __aligned_u64 peer_gid;
85 __aligned_u64 my_gid;
86 __aligned_u64 token;
87 __aligned_u64 peer_token;
88};
Christopher Ferris525ce912017-07-26 13:12:53 -070089#endif