~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/smc_diag.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _UAPI_SMC_DIAG_H_
  3 #define _UAPI_SMC_DIAG_H_
  4 
  5 #include <linux/types.h>
  6 #include <linux/inet_diag.h>
  7 #include <rdma/ib_user_verbs.h>
  8 
  9 /* Request structure */
 10 struct smc_diag_req {
 11         __u8    diag_family;
 12         __u8    pad[2];
 13         __u8    diag_ext;               /* Query extended information */
 14         struct inet_diag_sockid id;
 15 };
 16 
 17 /* Base info structure. It contains socket identity (addrs/ports/cookie) based
 18  * on the internal clcsock, and more SMC-related socket data
 19  */
 20 struct smc_diag_msg {
 21         __u8            diag_family;
 22         __u8            diag_state;
 23         union {
 24                 __u8    diag_mode;
 25                 __u8    diag_fallback; /* the old name of the field */
 26         };
 27         __u8            diag_shutdown;
 28         struct inet_diag_sockid id;
 29 
 30         __u32           diag_uid;
 31         __aligned_u64   diag_inode;
 32 };
 33 
 34 /* Mode of a connection */
 35 enum {
 36         SMC_DIAG_MODE_SMCR,
 37         SMC_DIAG_MODE_FALLBACK_TCP,
 38         SMC_DIAG_MODE_SMCD,
 39 };
 40 
 41 /* Extensions */
 42 
 43 enum {
 44         SMC_DIAG_NONE,
 45         SMC_DIAG_CONNINFO,
 46         SMC_DIAG_LGRINFO,
 47         SMC_DIAG_SHUTDOWN,
 48         SMC_DIAG_DMBINFO,
 49         SMC_DIAG_FALLBACK,
 50         __SMC_DIAG_MAX,
 51 };
 52 
 53 #define SMC_DIAG_MAX (__SMC_DIAG_MAX - 1)
 54 
 55 /* SMC_DIAG_CONNINFO */
 56 
 57 struct smc_diag_cursor {
 58         __u16   reserved;
 59         __u16   wrap;
 60         __u32   count;
 61 };
 62 
 63 struct smc_diag_conninfo {
 64         __u32                   token;          /* unique connection id */
 65         __u32                   sndbuf_size;    /* size of send buffer */
 66         __u32                   rmbe_size;      /* size of RMB element */
 67         __u32                   peer_rmbe_size; /* size of peer RMB element */
 68         /* local RMB element cursors */
 69         struct smc_diag_cursor  rx_prod;        /* received producer cursor */
 70         struct smc_diag_cursor  rx_cons;        /* received consumer cursor */
 71         /* peer RMB element cursors */
 72         struct smc_diag_cursor  tx_prod;        /* sent producer cursor */
 73         struct smc_diag_cursor  tx_cons;        /* sent consumer cursor */
 74         __u8                    rx_prod_flags;  /* received producer flags */
 75         __u8                    rx_conn_state_flags; /* recvd connection flags*/
 76         __u8                    tx_prod_flags;  /* sent producer flags */
 77         __u8                    tx_conn_state_flags; /* sent connection flags*/
 78         /* send buffer cursors */
 79         struct smc_diag_cursor  tx_prep;        /* prepared to be sent cursor */
 80         struct smc_diag_cursor  tx_sent;        /* sent cursor */
 81         struct smc_diag_cursor  tx_fin;         /* confirmed sent cursor */
 82 };
 83 
 84 /* SMC_DIAG_LINKINFO */
 85 
 86 struct smc_diag_linkinfo {
 87         __u8 link_id;                   /* link identifier */
 88         __u8 ibname[IB_DEVICE_NAME_MAX]; /* name of the RDMA device */
 89         __u8 ibport;                    /* RDMA device port number */
 90         __u8 gid[40];                   /* local GID */
 91         __u8 peer_gid[40];              /* peer GID */
 92 };
 93 
 94 struct smc_diag_lgrinfo {
 95         struct smc_diag_linkinfo        lnk[1];
 96         __u8                            role;
 97 };
 98 
 99 struct smc_diag_fallback {
100         __u32 reason;
101         __u32 peer_diagnosis;
102 };
103 
104 struct smcd_diag_dmbinfo {              /* SMC-D Socket internals */
105         __u32           linkid;         /* Link identifier */
106         __aligned_u64   peer_gid;       /* Peer GID */
107         __aligned_u64   my_gid;         /* My GID */
108         __aligned_u64   token;          /* Token of DMB */
109         __aligned_u64   peer_token;     /* Token of remote DMBE */
110         __aligned_u64   peer_gid_ext;   /* Peer GID (extended part) */
111         __aligned_u64   my_gid_ext;     /* My GID (extended part) */
112 };
113 
114 #endif /* _UAPI_SMC_DIAG_H_ */
115 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php