Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 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 Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 7 | #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> |
| 12 | struct smc_diag_req { |
| 13 | __u8 diag_family; |
| 14 | __u8 pad[2]; |
| 15 | __u8 diag_ext; |
| 16 | struct inet_diag_sockid id; |
| 17 | }; |
| 18 | struct smc_diag_msg { |
| 19 | __u8 diag_family; |
| 20 | __u8 diag_state; |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 21 | union { |
| 22 | __u8 diag_mode; |
| 23 | __u8 diag_fallback; |
| 24 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 25 | __u8 diag_shutdown; |
| 26 | struct inet_diag_sockid id; |
| 27 | __u32 diag_uid; |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 28 | __aligned_u64 diag_inode; |
| 29 | }; |
| 30 | enum { |
| 31 | SMC_DIAG_MODE_SMCR, |
| 32 | SMC_DIAG_MODE_FALLBACK_TCP, |
| 33 | SMC_DIAG_MODE_SMCD, |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 34 | }; |
| 35 | enum { |
| 36 | SMC_DIAG_NONE, |
| 37 | SMC_DIAG_CONNINFO, |
| 38 | SMC_DIAG_LGRINFO, |
| 39 | SMC_DIAG_SHUTDOWN, |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 40 | SMC_DIAG_DMBINFO, |
| 41 | SMC_DIAG_FALLBACK, |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 42 | __SMC_DIAG_MAX, |
| 43 | }; |
| 44 | #define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1) |
| 45 | struct smc_diag_cursor { |
| 46 | __u16 reserved; |
| 47 | __u16 wrap; |
| 48 | __u32 count; |
| 49 | }; |
| 50 | struct 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 | }; |
| 67 | struct 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 | }; |
| 74 | struct smc_diag_lgrinfo { |
| 75 | struct smc_diag_linkinfo lnk[1]; |
| 76 | __u8 role; |
| 77 | }; |
Christopher Ferris | a981e2e | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 78 | struct smc_diag_fallback { |
| 79 | __u32 reason; |
| 80 | __u32 peer_diagnosis; |
| 81 | }; |
| 82 | struct 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 Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 89 | #endif |