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

TOMOYO Linux Cross Reference
Linux/include/linux/nvme-tcp.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 ] ~

Diff markup

Differences between /include/linux/nvme-tcp.h (Version linux-6.11-rc3) and /include/linux/nvme-tcp.h (Version linux-6.5.13)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * NVMe over Fabrics TCP protocol header.           3  * NVMe over Fabrics TCP protocol header.
  4  * Copyright (c) 2018 Lightbits Labs. All righ      4  * Copyright (c) 2018 Lightbits Labs. All rights reserved.
  5  */                                                 5  */
  6                                                     6 
  7 #ifndef _LINUX_NVME_TCP_H                           7 #ifndef _LINUX_NVME_TCP_H
  8 #define _LINUX_NVME_TCP_H                           8 #define _LINUX_NVME_TCP_H
  9                                                     9 
 10 #include <linux/nvme.h>                            10 #include <linux/nvme.h>
 11                                                    11 
 12 #define NVME_TCP_DISC_PORT      8009               12 #define NVME_TCP_DISC_PORT      8009
 13 #define NVME_TCP_ADMIN_CCSZ     SZ_8K              13 #define NVME_TCP_ADMIN_CCSZ     SZ_8K
 14 #define NVME_TCP_DIGEST_LENGTH  4                  14 #define NVME_TCP_DIGEST_LENGTH  4
 15 #define NVME_TCP_MIN_MAXH2CDATA 4096               15 #define NVME_TCP_MIN_MAXH2CDATA 4096
 16                                                    16 
 17 enum nvme_tcp_pfv {                                17 enum nvme_tcp_pfv {
 18         NVME_TCP_PFV_1_0 = 0x0,                    18         NVME_TCP_PFV_1_0 = 0x0,
 19 };                                                 19 };
 20                                                    20 
 21 enum nvme_tcp_tls_cipher {                     << 
 22         NVME_TCP_TLS_CIPHER_INVALID     = 0,   << 
 23         NVME_TCP_TLS_CIPHER_SHA256      = 1,   << 
 24         NVME_TCP_TLS_CIPHER_SHA384      = 2,   << 
 25 };                                             << 
 26                                                << 
 27 enum nvme_tcp_fatal_error_status {                 21 enum nvme_tcp_fatal_error_status {
 28         NVME_TCP_FES_INVALID_PDU_HDR               22         NVME_TCP_FES_INVALID_PDU_HDR            = 0x01,
 29         NVME_TCP_FES_PDU_SEQ_ERR                   23         NVME_TCP_FES_PDU_SEQ_ERR                = 0x02,
 30         NVME_TCP_FES_HDR_DIGEST_ERR                24         NVME_TCP_FES_HDR_DIGEST_ERR             = 0x03,
 31         NVME_TCP_FES_DATA_OUT_OF_RANGE             25         NVME_TCP_FES_DATA_OUT_OF_RANGE          = 0x04,
 32         NVME_TCP_FES_R2T_LIMIT_EXCEEDED            26         NVME_TCP_FES_R2T_LIMIT_EXCEEDED         = 0x05,
 33         NVME_TCP_FES_DATA_LIMIT_EXCEEDED           27         NVME_TCP_FES_DATA_LIMIT_EXCEEDED        = 0x05,
 34         NVME_TCP_FES_UNSUPPORTED_PARAM             28         NVME_TCP_FES_UNSUPPORTED_PARAM          = 0x06,
 35 };                                                 29 };
 36                                                    30 
 37 enum nvme_tcp_digest_option {                      31 enum nvme_tcp_digest_option {
 38         NVME_TCP_HDR_DIGEST_ENABLE      = (1 <     32         NVME_TCP_HDR_DIGEST_ENABLE      = (1 << 0),
 39         NVME_TCP_DATA_DIGEST_ENABLE     = (1 <     33         NVME_TCP_DATA_DIGEST_ENABLE     = (1 << 1),
 40 };                                                 34 };
 41                                                    35 
 42 enum nvme_tcp_pdu_type {                           36 enum nvme_tcp_pdu_type {
 43         nvme_tcp_icreq          = 0x0,             37         nvme_tcp_icreq          = 0x0,
 44         nvme_tcp_icresp         = 0x1,             38         nvme_tcp_icresp         = 0x1,
 45         nvme_tcp_h2c_term       = 0x2,             39         nvme_tcp_h2c_term       = 0x2,
 46         nvme_tcp_c2h_term       = 0x3,             40         nvme_tcp_c2h_term       = 0x3,
 47         nvme_tcp_cmd            = 0x4,             41         nvme_tcp_cmd            = 0x4,
 48         nvme_tcp_rsp            = 0x5,             42         nvme_tcp_rsp            = 0x5,
 49         nvme_tcp_h2c_data       = 0x6,             43         nvme_tcp_h2c_data       = 0x6,
 50         nvme_tcp_c2h_data       = 0x7,             44         nvme_tcp_c2h_data       = 0x7,
 51         nvme_tcp_r2t            = 0x9,             45         nvme_tcp_r2t            = 0x9,
 52 };                                                 46 };
 53                                                    47 
 54 enum nvme_tcp_pdu_flags {                          48 enum nvme_tcp_pdu_flags {
 55         NVME_TCP_F_HDGST                = (1 <     49         NVME_TCP_F_HDGST                = (1 << 0),
 56         NVME_TCP_F_DDGST                = (1 <     50         NVME_TCP_F_DDGST                = (1 << 1),
 57         NVME_TCP_F_DATA_LAST            = (1 <     51         NVME_TCP_F_DATA_LAST            = (1 << 2),
 58         NVME_TCP_F_DATA_SUCCESS         = (1 <     52         NVME_TCP_F_DATA_SUCCESS         = (1 << 3),
 59 };                                                 53 };
 60                                                    54 
 61 /**                                                55 /**
 62  * struct nvme_tcp_hdr - nvme tcp pdu common h     56  * struct nvme_tcp_hdr - nvme tcp pdu common header
 63  *                                                 57  *
 64  * @type:          pdu type                        58  * @type:          pdu type
 65  * @flags:         pdu specific flags              59  * @flags:         pdu specific flags
 66  * @hlen:          pdu header length               60  * @hlen:          pdu header length
 67  * @pdo:           pdu data offset                 61  * @pdo:           pdu data offset
 68  * @plen:          pdu wire byte length            62  * @plen:          pdu wire byte length
 69  */                                                63  */
 70 struct nvme_tcp_hdr {                              64 struct nvme_tcp_hdr {
 71         __u8    type;                              65         __u8    type;
 72         __u8    flags;                             66         __u8    flags;
 73         __u8    hlen;                              67         __u8    hlen;
 74         __u8    pdo;                               68         __u8    pdo;
 75         __le32  plen;                              69         __le32  plen;
 76 };                                                 70 };
 77                                                    71 
 78 /**                                                72 /**
 79  * struct nvme_tcp_icreq_pdu - nvme tcp initia     73  * struct nvme_tcp_icreq_pdu - nvme tcp initialize connection request pdu
 80  *                                                 74  *
 81  * @hdr:           pdu generic header              75  * @hdr:           pdu generic header
 82  * @pfv:           pdu version format              76  * @pfv:           pdu version format
 83  * @hpda:          host pdu data alignment (dw     77  * @hpda:          host pdu data alignment (dwords, 0's based)
 84  * @digest:        digest types enabled            78  * @digest:        digest types enabled
 85  * @maxr2t:        maximum r2ts per request su     79  * @maxr2t:        maximum r2ts per request supported
 86  */                                                80  */
 87 struct nvme_tcp_icreq_pdu {                        81 struct nvme_tcp_icreq_pdu {
 88         struct nvme_tcp_hdr     hdr;               82         struct nvme_tcp_hdr     hdr;
 89         __le16                  pfv;               83         __le16                  pfv;
 90         __u8                    hpda;              84         __u8                    hpda;
 91         __u8                    digest;            85         __u8                    digest;
 92         __le32                  maxr2t;            86         __le32                  maxr2t;
 93         __u8                    rsvd2[112];        87         __u8                    rsvd2[112];
 94 };                                                 88 };
 95                                                    89 
 96 /**                                                90 /**
 97  * struct nvme_tcp_icresp_pdu - nvme tcp initi     91  * struct nvme_tcp_icresp_pdu - nvme tcp initialize connection response pdu
 98  *                                                 92  *
 99  * @hdr:           pdu common header               93  * @hdr:           pdu common header
100  * @pfv:           pdu version format              94  * @pfv:           pdu version format
101  * @cpda:          controller pdu data alignme     95  * @cpda:          controller pdu data alignment (dowrds, 0's based)
102  * @digest:        digest types enabled            96  * @digest:        digest types enabled
103  * @maxdata:       maximum data capsules per r     97  * @maxdata:       maximum data capsules per r2t supported
104  */                                                98  */
105 struct nvme_tcp_icresp_pdu {                       99 struct nvme_tcp_icresp_pdu {
106         struct nvme_tcp_hdr     hdr;              100         struct nvme_tcp_hdr     hdr;
107         __le16                  pfv;              101         __le16                  pfv;
108         __u8                    cpda;             102         __u8                    cpda;
109         __u8                    digest;           103         __u8                    digest;
110         __le32                  maxdata;          104         __le32                  maxdata;
111         __u8                    rsvd[112];        105         __u8                    rsvd[112];
112 };                                                106 };
113                                                   107 
114 /**                                               108 /**
115  * struct nvme_tcp_term_pdu - nvme tcp termina    109  * struct nvme_tcp_term_pdu - nvme tcp terminate connection pdu
116  *                                                110  *
117  * @hdr:           pdu common header              111  * @hdr:           pdu common header
118  * @fes:           fatal error status             112  * @fes:           fatal error status
119  * @fei:           fatal error information        113  * @fei:           fatal error information
120  */                                               114  */
121 struct nvme_tcp_term_pdu {                        115 struct nvme_tcp_term_pdu {
122         struct nvme_tcp_hdr     hdr;              116         struct nvme_tcp_hdr     hdr;
123         __le16                  fes;              117         __le16                  fes;
124         __le16                  feil;             118         __le16                  feil;
125         __le16                  feiu;             119         __le16                  feiu;
126         __u8                    rsvd[10];         120         __u8                    rsvd[10];
127 };                                                121 };
128                                                   122 
129 /**                                               123 /**
130  * struct nvme_tcp_cmd_pdu - nvme tcp command     124  * struct nvme_tcp_cmd_pdu - nvme tcp command capsule pdu
131  *                                                125  *
132  * @hdr:           pdu common header              126  * @hdr:           pdu common header
133  * @cmd:           nvme command                   127  * @cmd:           nvme command
134  */                                               128  */
135 struct nvme_tcp_cmd_pdu {                         129 struct nvme_tcp_cmd_pdu {
136         struct nvme_tcp_hdr     hdr;              130         struct nvme_tcp_hdr     hdr;
137         struct nvme_command     cmd;              131         struct nvme_command     cmd;
138 };                                                132 };
139                                                   133 
140 /**                                               134 /**
141  * struct nvme_tcp_rsp_pdu - nvme tcp response    135  * struct nvme_tcp_rsp_pdu - nvme tcp response capsule pdu
142  *                                                136  *
143  * @hdr:           pdu common header              137  * @hdr:           pdu common header
144  * @hdr:           nvme-tcp generic header        138  * @hdr:           nvme-tcp generic header
145  * @cqe:           nvme completion queue entry    139  * @cqe:           nvme completion queue entry
146  */                                               140  */
147 struct nvme_tcp_rsp_pdu {                         141 struct nvme_tcp_rsp_pdu {
148         struct nvme_tcp_hdr     hdr;              142         struct nvme_tcp_hdr     hdr;
149         struct nvme_completion  cqe;              143         struct nvme_completion  cqe;
150 };                                                144 };
151                                                   145 
152 /**                                               146 /**
153  * struct nvme_tcp_r2t_pdu - nvme tcp ready-to    147  * struct nvme_tcp_r2t_pdu - nvme tcp ready-to-transfer pdu
154  *                                                148  *
155  * @hdr:           pdu common header              149  * @hdr:           pdu common header
156  * @command_id:    nvme command identifier whi    150  * @command_id:    nvme command identifier which this relates to
157  * @ttag:          transfer tag (controller ge    151  * @ttag:          transfer tag (controller generated)
158  * @r2t_offset:    offset from the start of th    152  * @r2t_offset:    offset from the start of the command data
159  * @r2t_length:    length the host is allowed     153  * @r2t_length:    length the host is allowed to send
160  */                                               154  */
161 struct nvme_tcp_r2t_pdu {                         155 struct nvme_tcp_r2t_pdu {
162         struct nvme_tcp_hdr     hdr;              156         struct nvme_tcp_hdr     hdr;
163         __u16                   command_id;       157         __u16                   command_id;
164         __u16                   ttag;             158         __u16                   ttag;
165         __le32                  r2t_offset;       159         __le32                  r2t_offset;
166         __le32                  r2t_length;       160         __le32                  r2t_length;
167         __u8                    rsvd[4];          161         __u8                    rsvd[4];
168 };                                                162 };
169                                                   163 
170 /**                                               164 /**
171  * struct nvme_tcp_data_pdu - nvme tcp data pd    165  * struct nvme_tcp_data_pdu - nvme tcp data pdu
172  *                                                166  *
173  * @hdr:           pdu common header              167  * @hdr:           pdu common header
174  * @command_id:    nvme command identifier whi    168  * @command_id:    nvme command identifier which this relates to
175  * @ttag:          transfer tag (controller ge    169  * @ttag:          transfer tag (controller generated)
176  * @data_offset:   offset from the start of th    170  * @data_offset:   offset from the start of the command data
177  * @data_length:   length of the data stream      171  * @data_length:   length of the data stream
178  */                                               172  */
179 struct nvme_tcp_data_pdu {                        173 struct nvme_tcp_data_pdu {
180         struct nvme_tcp_hdr     hdr;              174         struct nvme_tcp_hdr     hdr;
181         __u16                   command_id;       175         __u16                   command_id;
182         __u16                   ttag;             176         __u16                   ttag;
183         __le32                  data_offset;      177         __le32                  data_offset;
184         __le32                  data_length;      178         __le32                  data_length;
185         __u8                    rsvd[4];          179         __u8                    rsvd[4];
186 };                                                180 };
187                                                   181 
188 union nvme_tcp_pdu {                              182 union nvme_tcp_pdu {
189         struct nvme_tcp_icreq_pdu       icreq;    183         struct nvme_tcp_icreq_pdu       icreq;
190         struct nvme_tcp_icresp_pdu      icresp    184         struct nvme_tcp_icresp_pdu      icresp;
191         struct nvme_tcp_cmd_pdu         cmd;      185         struct nvme_tcp_cmd_pdu         cmd;
192         struct nvme_tcp_rsp_pdu         rsp;      186         struct nvme_tcp_rsp_pdu         rsp;
193         struct nvme_tcp_r2t_pdu         r2t;      187         struct nvme_tcp_r2t_pdu         r2t;
194         struct nvme_tcp_data_pdu        data;     188         struct nvme_tcp_data_pdu        data;
195 };                                                189 };
196                                                   190 
197 #endif /* _LINUX_NVME_TCP_H */                    191 #endif /* _LINUX_NVME_TCP_H */
198                                                   192 

~ [ 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