1/****************************************************************************
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;
33  __u8 diag_fallback;
34  __u8 diag_shutdown;
35  struct inet_diag_sockid id;
36  __u32 diag_uid;
37  __u64 diag_inode;
38};
39enum {
40  SMC_DIAG_NONE,
41  SMC_DIAG_CONNINFO,
42  SMC_DIAG_LGRINFO,
43  SMC_DIAG_SHUTDOWN,
44  __SMC_DIAG_MAX,
45};
46#define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
47struct smc_diag_cursor {
48  __u16 reserved;
49  __u16 wrap;
50  __u32 count;
51};
52struct smc_diag_conninfo {
53  __u32 token;
54  __u32 sndbuf_size;
55  __u32 rmbe_size;
56  __u32 peer_rmbe_size;
57  struct smc_diag_cursor rx_prod;
58  struct smc_diag_cursor rx_cons;
59  struct smc_diag_cursor tx_prod;
60  struct smc_diag_cursor tx_cons;
61  __u8 rx_prod_flags;
62  __u8 rx_conn_state_flags;
63  __u8 tx_prod_flags;
64  __u8 tx_conn_state_flags;
65  struct smc_diag_cursor tx_prep;
66  struct smc_diag_cursor tx_sent;
67  struct smc_diag_cursor tx_fin;
68};
69struct 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};
76struct smc_diag_lgrinfo {
77  struct smc_diag_linkinfo lnk[1];
78  __u8 role;
79};
80#endif
81