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> 24 struct smc_diag_req { 25 __u8 diag_family; 26 __u8 pad[2]; 27 __u8 diag_ext; 28 struct inet_diag_sockid id; 29 }; 30 struct smc_diag_msg { 31 __u8 diag_family; 32 __u8 diag_state; 33 union { 34 __u8 diag_mode; 35 __u8 diag_fallback; 36 }; 37 __u8 diag_shutdown; 38 struct inet_diag_sockid id; 39 __u32 diag_uid; 40 __aligned_u64 diag_inode; 41 }; 42 enum { 43 SMC_DIAG_MODE_SMCR, 44 SMC_DIAG_MODE_FALLBACK_TCP, 45 SMC_DIAG_MODE_SMCD, 46 }; 47 enum { 48 SMC_DIAG_NONE, 49 SMC_DIAG_CONNINFO, 50 SMC_DIAG_LGRINFO, 51 SMC_DIAG_SHUTDOWN, 52 SMC_DIAG_DMBINFO, 53 SMC_DIAG_FALLBACK, 54 __SMC_DIAG_MAX, 55 }; 56 #define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1) 57 struct smc_diag_cursor { 58 __u16 reserved; 59 __u16 wrap; 60 __u32 count; 61 }; 62 struct 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 }; 79 struct 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 }; 86 struct smc_diag_lgrinfo { 87 struct smc_diag_linkinfo lnk[1]; 88 __u8 role; 89 }; 90 struct smc_diag_fallback { 91 __u32 reason; 92 __u32 peer_diagnosis; 93 }; 94 struct 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 }; 101 #endif 102