blob: 2c1a4af9eafb653c3f91919f0dff298c6bbd79fe [file] [log] [blame]
Alex Aizman39e84792005-08-04 19:31:00 -07001/*
2 * iSCSI User/Kernel Shares (Defines, Constants, Protocol definitions, etc)
3 *
4 * Copyright (C) 2005 Dmitry Yusupov
5 * Copyright (C) 2005 Alex Aizman
6 * maintained by open-iscsi@googlegroups.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published
10 * by the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * See the file COPYING included with this distribution for more details.
19 */
20
21#ifndef ISCSI_IF_H
22#define ISCSI_IF_H
23
24#include <scsi/iscsi_proto.h>
25
26#define UEVENT_BASE 10
27#define KEVENT_BASE 100
28#define ISCSI_ERR_BASE 1000
29
30enum iscsi_uevent_e {
31 ISCSI_UEVENT_UNKNOWN = 0,
32
33 /* down events */
34 ISCSI_UEVENT_CREATE_SESSION = UEVENT_BASE + 1,
35 ISCSI_UEVENT_DESTROY_SESSION = UEVENT_BASE + 2,
36 ISCSI_UEVENT_CREATE_CONN = UEVENT_BASE + 3,
37 ISCSI_UEVENT_DESTROY_CONN = UEVENT_BASE + 4,
38 ISCSI_UEVENT_BIND_CONN = UEVENT_BASE + 5,
39 ISCSI_UEVENT_SET_PARAM = UEVENT_BASE + 6,
40 ISCSI_UEVENT_START_CONN = UEVENT_BASE + 7,
41 ISCSI_UEVENT_STOP_CONN = UEVENT_BASE + 8,
42 ISCSI_UEVENT_SEND_PDU = UEVENT_BASE + 9,
43 ISCSI_UEVENT_GET_STATS = UEVENT_BASE + 10,
44 ISCSI_UEVENT_GET_PARAM = UEVENT_BASE + 11,
45
Or Gerlitz264faaa2006-05-02 19:46:36 -050046 ISCSI_UEVENT_TRANSPORT_EP_CONNECT = UEVENT_BASE + 12,
47 ISCSI_UEVENT_TRANSPORT_EP_POLL = UEVENT_BASE + 13,
48 ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT = UEVENT_BASE + 14,
49
Mike Christie01cb2252006-06-28 12:00:22 -050050 ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15,
Mike Christie1d9bf132007-05-30 12:57:11 -050051 ISCSI_UEVENT_SET_HOST_PARAM = UEVENT_BASE + 16,
Mike Christie26974782007-12-13 12:43:29 -060052 ISCSI_UEVENT_UNBIND_SESSION = UEVENT_BASE + 17,
Mike Christie10eb0f02009-05-13 17:57:38 -050053 ISCSI_UEVENT_CREATE_BOUND_SESSION = UEVENT_BASE + 18,
54 ISCSI_UEVENT_TRANSPORT_EP_CONNECT_THROUGH_HOST = UEVENT_BASE + 19,
Mike Christie01cb2252006-06-28 12:00:22 -050055
Alex Aizman39e84792005-08-04 19:31:00 -070056 /* up events */
57 ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1,
58 ISCSI_KEVENT_CONN_ERROR = KEVENT_BASE + 2,
59 ISCSI_KEVENT_IF_ERROR = KEVENT_BASE + 3,
Mike Christie53cb8a12006-06-28 12:00:32 -050060 ISCSI_KEVENT_DESTROY_SESSION = KEVENT_BASE + 4,
Mike Christie26974782007-12-13 12:43:29 -060061 ISCSI_KEVENT_UNBIND_SESSION = KEVENT_BASE + 5,
62 ISCSI_KEVENT_CREATE_SESSION = KEVENT_BASE + 6,
Alex Aizman39e84792005-08-04 19:31:00 -070063};
64
Mike Christie01cb2252006-06-28 12:00:22 -050065enum iscsi_tgt_dscvr {
66 ISCSI_TGT_DSCVR_SEND_TARGETS = 1,
67 ISCSI_TGT_DSCVR_ISNS = 2,
68 ISCSI_TGT_DSCVR_SLP = 3,
69};
70
Alex Aizman39e84792005-08-04 19:31:00 -070071struct iscsi_uevent {
72 uint32_t type; /* k/u events type */
73 uint32_t iferror; /* carries interface or resource errors */
74 uint64_t transport_handle;
75
76 union {
77 /* messages u -> k */
78 struct msg_create_session {
79 uint32_t initial_cmdsn;
Mike Christie15482712007-05-30 12:57:19 -050080 uint16_t cmds_max;
81 uint16_t queue_depth;
Alex Aizman39e84792005-08-04 19:31:00 -070082 } c_session;
Mike Christie40753ca2008-05-21 15:53:56 -050083 struct msg_create_bound_session {
Mike Christied82ff9be2008-05-21 15:54:13 -050084 uint64_t ep_handle;
Mike Christie40753ca2008-05-21 15:53:56 -050085 uint32_t initial_cmdsn;
86 uint16_t cmds_max;
87 uint16_t queue_depth;
88 } c_bound_session;
Alex Aizman39e84792005-08-04 19:31:00 -070089 struct msg_destroy_session {
Alex Aizman39e84792005-08-04 19:31:00 -070090 uint32_t sid;
91 } d_session;
92 struct msg_create_conn {
Alex Aizman39e84792005-08-04 19:31:00 -070093 uint32_t sid;
Mike Christieb5c7a122006-04-06 21:13:33 -050094 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -070095 } c_conn;
96 struct msg_bind_conn {
Mike Christieb5c7a122006-04-06 21:13:33 -050097 uint32_t sid;
98 uint32_t cid;
Or Gerlitz264faaa2006-05-02 19:46:36 -050099 uint64_t transport_eph;
Alex Aizman39e84792005-08-04 19:31:00 -0700100 uint32_t is_leading;
101 } b_conn;
102 struct msg_destroy_conn {
Mike Christieb5c7a122006-04-06 21:13:33 -0500103 uint32_t sid;
Alex Aizman39e84792005-08-04 19:31:00 -0700104 uint32_t cid;
105 } d_conn;
106 struct msg_send_pdu {
Mike Christieb5c7a122006-04-06 21:13:33 -0500107 uint32_t sid;
108 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -0700109 uint32_t hdr_size;
110 uint32_t data_size;
Alex Aizman39e84792005-08-04 19:31:00 -0700111 } send_pdu;
112 struct msg_set_param {
Mike Christieb5c7a122006-04-06 21:13:33 -0500113 uint32_t sid;
114 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -0700115 uint32_t param; /* enum iscsi_param */
Mike Christiefd7255f2006-04-06 21:13:36 -0500116 uint32_t len;
Alex Aizman39e84792005-08-04 19:31:00 -0700117 } set_param;
118 struct msg_start_conn {
Mike Christieb5c7a122006-04-06 21:13:33 -0500119 uint32_t sid;
120 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -0700121 } start_conn;
122 struct msg_stop_conn {
Mike Christieb5c7a122006-04-06 21:13:33 -0500123 uint32_t sid;
124 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -0700125 uint64_t conn_handle;
126 uint32_t flag;
127 } stop_conn;
128 struct msg_get_stats {
Mike Christieb5c7a122006-04-06 21:13:33 -0500129 uint32_t sid;
130 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -0700131 } get_stats;
Or Gerlitz264faaa2006-05-02 19:46:36 -0500132 struct msg_transport_connect {
133 uint32_t non_blocking;
134 } ep_connect;
Mike Christie10eb0f02009-05-13 17:57:38 -0500135 struct msg_transport_connect_through_host {
136 uint32_t host_no;
137 uint32_t non_blocking;
138 } ep_connect_through_host;
Or Gerlitz264faaa2006-05-02 19:46:36 -0500139 struct msg_transport_poll {
140 uint64_t ep_handle;
141 uint32_t timeout_ms;
142 } ep_poll;
143 struct msg_transport_disconnect {
144 uint64_t ep_handle;
145 } ep_disconnect;
Mike Christie01cb2252006-06-28 12:00:22 -0500146 struct msg_tgt_dscvr {
147 enum iscsi_tgt_dscvr type;
148 uint32_t host_no;
149 /*
150 * enable = 1 to establish a new connection
151 * with the server. enable = 0 to disconnect
152 * from the server. Used primarily to switch
153 * from one iSNS server to another.
154 */
155 uint32_t enable;
156 } tgt_dscvr;
Mike Christie1d9bf132007-05-30 12:57:11 -0500157 struct msg_set_host_param {
158 uint32_t host_no;
159 uint32_t param; /* enum iscsi_host_param */
160 uint32_t len;
161 } set_host_param;
Alex Aizman39e84792005-08-04 19:31:00 -0700162 } u;
163 union {
164 /* messages k -> u */
Alex Aizman39e84792005-08-04 19:31:00 -0700165 int retcode;
166 struct msg_create_session_ret {
Alex Aizman39e84792005-08-04 19:31:00 -0700167 uint32_t sid;
Mike Christieb5c7a122006-04-06 21:13:33 -0500168 uint32_t host_no;
Alex Aizman39e84792005-08-04 19:31:00 -0700169 } c_session_ret;
Mike Christieb5c7a122006-04-06 21:13:33 -0500170 struct msg_create_conn_ret {
171 uint32_t sid;
172 uint32_t cid;
173 } c_conn_ret;
Mike Christie26974782007-12-13 12:43:29 -0600174 struct msg_unbind_session {
175 uint32_t sid;
176 uint32_t host_no;
177 } unbind_session;
Alex Aizman39e84792005-08-04 19:31:00 -0700178 struct msg_recv_req {
Mike Christieb5c7a122006-04-06 21:13:33 -0500179 uint32_t sid;
180 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -0700181 uint64_t recv_handle;
Alex Aizman39e84792005-08-04 19:31:00 -0700182 } recv_req;
183 struct msg_conn_error {
Mike Christieb5c7a122006-04-06 21:13:33 -0500184 uint32_t sid;
185 uint32_t cid;
Alex Aizman39e84792005-08-04 19:31:00 -0700186 uint32_t error; /* enum iscsi_err */
187 } connerror;
Mike Christie53cb8a12006-06-28 12:00:32 -0500188 struct msg_session_destroyed {
189 uint32_t host_no;
190 uint32_t sid;
191 } d_session;
Or Gerlitz264faaa2006-05-02 19:46:36 -0500192 struct msg_transport_connect_ret {
193 uint64_t handle;
194 } ep_connect_ret;
Alex Aizman39e84792005-08-04 19:31:00 -0700195 } r;
196} __attribute__ ((aligned (sizeof(uint64_t))));
197
198/*
199 * Common error codes
200 */
201enum iscsi_err {
202 ISCSI_OK = 0,
203
204 ISCSI_ERR_DATASN = ISCSI_ERR_BASE + 1,
205 ISCSI_ERR_DATA_OFFSET = ISCSI_ERR_BASE + 2,
206 ISCSI_ERR_MAX_CMDSN = ISCSI_ERR_BASE + 3,
207 ISCSI_ERR_EXP_CMDSN = ISCSI_ERR_BASE + 4,
208 ISCSI_ERR_BAD_OPCODE = ISCSI_ERR_BASE + 5,
209 ISCSI_ERR_DATALEN = ISCSI_ERR_BASE + 6,
210 ISCSI_ERR_AHSLEN = ISCSI_ERR_BASE + 7,
211 ISCSI_ERR_PROTO = ISCSI_ERR_BASE + 8,
212 ISCSI_ERR_LUN = ISCSI_ERR_BASE + 9,
213 ISCSI_ERR_BAD_ITT = ISCSI_ERR_BASE + 10,
214 ISCSI_ERR_CONN_FAILED = ISCSI_ERR_BASE + 11,
215 ISCSI_ERR_R2TSN = ISCSI_ERR_BASE + 12,
216 ISCSI_ERR_SESSION_FAILED = ISCSI_ERR_BASE + 13,
217 ISCSI_ERR_HDR_DGST = ISCSI_ERR_BASE + 14,
218 ISCSI_ERR_DATA_DGST = ISCSI_ERR_BASE + 15,
Mike Christie7996a772006-04-06 21:13:41 -0500219 ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16,
220 ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17,
Mike Christiee5bd7b52008-09-24 11:46:10 -0500221 ISCSI_ERR_INVALID_HOST = ISCSI_ERR_BASE + 18,
Mike Christie6f481e32008-09-24 11:46:13 -0500222 ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19,
Alex Aizman39e84792005-08-04 19:31:00 -0700223};
224
225/*
226 * iSCSI Parameters (RFC3720)
227 */
228enum iscsi_param {
Mike Christiefd7255f2006-04-06 21:13:36 -0500229 /* passed in using netlink set param */
230 ISCSI_PARAM_MAX_RECV_DLENGTH,
231 ISCSI_PARAM_MAX_XMIT_DLENGTH,
232 ISCSI_PARAM_HDRDGST_EN,
233 ISCSI_PARAM_DATADGST_EN,
234 ISCSI_PARAM_INITIAL_R2T_EN,
235 ISCSI_PARAM_MAX_R2T,
236 ISCSI_PARAM_IMM_DATA_EN,
237 ISCSI_PARAM_FIRST_BURST,
238 ISCSI_PARAM_MAX_BURST,
239 ISCSI_PARAM_PDU_INORDER_EN,
240 ISCSI_PARAM_DATASEQ_INORDER_EN,
241 ISCSI_PARAM_ERL,
242 ISCSI_PARAM_IFMARKER_EN,
243 ISCSI_PARAM_OFMARKER_EN,
Mike Christie8d2860b2006-05-02 19:46:47 -0500244 ISCSI_PARAM_EXP_STATSN,
Mike Christiefd7255f2006-04-06 21:13:36 -0500245 ISCSI_PARAM_TARGET_NAME,
246 ISCSI_PARAM_TPGT,
247 ISCSI_PARAM_PERSISTENT_ADDRESS,
248 ISCSI_PARAM_PERSISTENT_PORT,
Mike Christie30a6c652006-04-06 21:13:39 -0500249 ISCSI_PARAM_SESS_RECOVERY_TMO,
Mike Christiefd7255f2006-04-06 21:13:36 -0500250
251 /* pased in through bind conn using transport_fd */
252 ISCSI_PARAM_CONN_PORT,
253 ISCSI_PARAM_CONN_ADDRESS,
254
Mike Christieb2c64162007-05-30 12:57:16 -0500255 ISCSI_PARAM_USERNAME,
256 ISCSI_PARAM_USERNAME_IN,
257 ISCSI_PARAM_PASSWORD,
258 ISCSI_PARAM_PASSWORD_IN,
259
Mike Christie843c0a82007-12-13 12:43:20 -0600260 ISCSI_PARAM_FAST_ABORT,
Mike Christief6d51802007-12-13 12:43:30 -0600261 ISCSI_PARAM_ABORT_TMO,
262 ISCSI_PARAM_LU_RESET_TMO,
263 ISCSI_PARAM_HOST_RESET_TMO,
264
265 ISCSI_PARAM_PING_TMO,
266 ISCSI_PARAM_RECV_TMO,
Mike Christie88dfd342008-05-21 15:54:16 -0500267
268 ISCSI_PARAM_IFACE_NAME,
269 ISCSI_PARAM_ISID,
270 ISCSI_PARAM_INITIATOR_NAME,
Mike Christiefd7255f2006-04-06 21:13:36 -0500271 /* must always be last */
272 ISCSI_PARAM_MAX,
Alex Aizman39e84792005-08-04 19:31:00 -0700273};
Mike Christiefd7255f2006-04-06 21:13:36 -0500274
Mike Christie88dfd342008-05-21 15:54:16 -0500275#define ISCSI_MAX_RECV_DLENGTH (1ULL << ISCSI_PARAM_MAX_RECV_DLENGTH)
276#define ISCSI_MAX_XMIT_DLENGTH (1ULL << ISCSI_PARAM_MAX_XMIT_DLENGTH)
277#define ISCSI_HDRDGST_EN (1ULL << ISCSI_PARAM_HDRDGST_EN)
278#define ISCSI_DATADGST_EN (1ULL << ISCSI_PARAM_DATADGST_EN)
279#define ISCSI_INITIAL_R2T_EN (1ULL << ISCSI_PARAM_INITIAL_R2T_EN)
280#define ISCSI_MAX_R2T (1ULL << ISCSI_PARAM_MAX_R2T)
281#define ISCSI_IMM_DATA_EN (1ULL << ISCSI_PARAM_IMM_DATA_EN)
282#define ISCSI_FIRST_BURST (1ULL << ISCSI_PARAM_FIRST_BURST)
283#define ISCSI_MAX_BURST (1ULL << ISCSI_PARAM_MAX_BURST)
284#define ISCSI_PDU_INORDER_EN (1ULL << ISCSI_PARAM_PDU_INORDER_EN)
285#define ISCSI_DATASEQ_INORDER_EN (1ULL << ISCSI_PARAM_DATASEQ_INORDER_EN)
286#define ISCSI_ERL (1ULL << ISCSI_PARAM_ERL)
287#define ISCSI_IFMARKER_EN (1ULL << ISCSI_PARAM_IFMARKER_EN)
288#define ISCSI_OFMARKER_EN (1ULL << ISCSI_PARAM_OFMARKER_EN)
289#define ISCSI_EXP_STATSN (1ULL << ISCSI_PARAM_EXP_STATSN)
290#define ISCSI_TARGET_NAME (1ULL << ISCSI_PARAM_TARGET_NAME)
291#define ISCSI_TPGT (1ULL << ISCSI_PARAM_TPGT)
292#define ISCSI_PERSISTENT_ADDRESS (1ULL << ISCSI_PARAM_PERSISTENT_ADDRESS)
293#define ISCSI_PERSISTENT_PORT (1ULL << ISCSI_PARAM_PERSISTENT_PORT)
294#define ISCSI_SESS_RECOVERY_TMO (1ULL << ISCSI_PARAM_SESS_RECOVERY_TMO)
295#define ISCSI_CONN_PORT (1ULL << ISCSI_PARAM_CONN_PORT)
296#define ISCSI_CONN_ADDRESS (1ULL << ISCSI_PARAM_CONN_ADDRESS)
297#define ISCSI_USERNAME (1ULL << ISCSI_PARAM_USERNAME)
298#define ISCSI_USERNAME_IN (1ULL << ISCSI_PARAM_USERNAME_IN)
299#define ISCSI_PASSWORD (1ULL << ISCSI_PARAM_PASSWORD)
300#define ISCSI_PASSWORD_IN (1ULL << ISCSI_PARAM_PASSWORD_IN)
301#define ISCSI_FAST_ABORT (1ULL << ISCSI_PARAM_FAST_ABORT)
302#define ISCSI_ABORT_TMO (1ULL << ISCSI_PARAM_ABORT_TMO)
303#define ISCSI_LU_RESET_TMO (1ULL << ISCSI_PARAM_LU_RESET_TMO)
304#define ISCSI_HOST_RESET_TMO (1ULL << ISCSI_PARAM_HOST_RESET_TMO)
305#define ISCSI_PING_TMO (1ULL << ISCSI_PARAM_PING_TMO)
306#define ISCSI_RECV_TMO (1ULL << ISCSI_PARAM_RECV_TMO)
307#define ISCSI_IFACE_NAME (1ULL << ISCSI_PARAM_IFACE_NAME)
308#define ISCSI_ISID (1ULL << ISCSI_PARAM_ISID)
309#define ISCSI_INITIATOR_NAME (1ULL << ISCSI_PARAM_INITIATOR_NAME)
Alex Aizman39e84792005-08-04 19:31:00 -0700310
Mike Christie1819dc82007-05-30 12:57:08 -0500311/* iSCSI HBA params */
312enum iscsi_host_param {
313 ISCSI_HOST_PARAM_HWADDRESS,
Mike Christie8ad57812007-05-30 12:57:13 -0500314 ISCSI_HOST_PARAM_INITIATOR_NAME,
Mike Christied8196ed2007-05-30 12:57:25 -0500315 ISCSI_HOST_PARAM_NETDEV_NAME,
Mike Christie22236962007-05-30 12:57:24 -0500316 ISCSI_HOST_PARAM_IPADDRESS,
Mike Christie1819dc82007-05-30 12:57:08 -0500317 ISCSI_HOST_PARAM_MAX,
318};
319
Mike Christie88dfd342008-05-21 15:54:16 -0500320#define ISCSI_HOST_HWADDRESS (1ULL << ISCSI_HOST_PARAM_HWADDRESS)
321#define ISCSI_HOST_INITIATOR_NAME (1ULL << ISCSI_HOST_PARAM_INITIATOR_NAME)
322#define ISCSI_HOST_NETDEV_NAME (1ULL << ISCSI_HOST_PARAM_NETDEV_NAME)
323#define ISCSI_HOST_IPADDRESS (1ULL << ISCSI_HOST_PARAM_IPADDRESS)
Mike Christie1819dc82007-05-30 12:57:08 -0500324
Alex Aizman39e84792005-08-04 19:31:00 -0700325#define iscsi_ptr(_handle) ((void*)(unsigned long)_handle)
326#define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr)
Alex Aizman39e84792005-08-04 19:31:00 -0700327
328/*
329 * These flags presents iSCSI Data-Path capabilities.
330 */
331#define CAP_RECOVERY_L0 0x1
332#define CAP_RECOVERY_L1 0x2
333#define CAP_RECOVERY_L2 0x4
334#define CAP_MULTI_R2T 0x8
335#define CAP_HDRDGST 0x10
336#define CAP_DATADGST 0x20
337#define CAP_MULTI_CONN 0x40
338#define CAP_TEXT_NEGO 0x80
339#define CAP_MARKERS 0x100
Mike Christie0ab823d2007-05-30 12:57:22 -0500340#define CAP_FW_DB 0x200
Mike Christie63c62f12008-12-02 00:32:04 -0600341#define CAP_SENDTARGETS_OFFLOAD 0x400 /* offload discovery process */
342#define CAP_DATA_PATH_OFFLOAD 0x800 /* offload entire IO path */
343#define CAP_DIGEST_OFFLOAD 0x1000 /* offload hdr and data digests */
Mike Christie6df19a72008-12-02 00:32:16 -0600344#define CAP_PADDING_OFFLOAD 0x2000 /* offload padding insertion, removal,
345 and verification */
Alex Aizman39e84792005-08-04 19:31:00 -0700346
347/*
348 * These flags describes reason of stop_conn() call
349 */
350#define STOP_CONN_TERM 0x1
351#define STOP_CONN_SUSPEND 0x2
352#define STOP_CONN_RECOVER 0x3
353
354#define ISCSI_STATS_CUSTOM_MAX 32
355#define ISCSI_STATS_CUSTOM_DESC_MAX 64
356struct iscsi_stats_custom {
357 char desc[ISCSI_STATS_CUSTOM_DESC_MAX];
358 uint64_t value;
359};
360
361/*
362 * struct iscsi_stats - iSCSI Statistics (iSCSI MIB)
363 *
364 * Note: this structure contains counters collected on per-connection basis.
365 */
366struct iscsi_stats {
367 /* octets */
368 uint64_t txdata_octets;
369 uint64_t rxdata_octets;
370
371 /* xmit pdus */
372 uint32_t noptx_pdus;
373 uint32_t scsicmd_pdus;
374 uint32_t tmfcmd_pdus;
375 uint32_t login_pdus;
376 uint32_t text_pdus;
377 uint32_t dataout_pdus;
378 uint32_t logout_pdus;
379 uint32_t snack_pdus;
380
381 /* recv pdus */
382 uint32_t noprx_pdus;
383 uint32_t scsirsp_pdus;
384 uint32_t tmfrsp_pdus;
385 uint32_t textrsp_pdus;
386 uint32_t datain_pdus;
387 uint32_t logoutrsp_pdus;
388 uint32_t r2t_pdus;
389 uint32_t async_pdus;
390 uint32_t rjt_pdus;
391
392 /* errors */
393 uint32_t digest_err;
394 uint32_t timeout_err;
395
396 /*
397 * iSCSI Custom Statistics support, i.e. Transport could
398 * extend existing MIB statistics with its own specific statistics
399 * up to ISCSI_STATS_CUSTOM_MAX
400 */
401 uint32_t custom_length;
402 struct iscsi_stats_custom custom[0]
403 __attribute__ ((aligned (sizeof(uint64_t))));
404};
405
406#endif