]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - drivers/target/iscsi/iscsi_target_seq_pdu_list.h
1 #ifndef ISCSI_SEQ_AND_PDU_LIST_H
2 #define ISCSI_SEQ_AND_PDU_LIST_H
4 /* struct iscsi_pdu->status */
5 #define DATAOUT_PDU_SENT 1
7 /* struct iscsi_seq->type */
8 #define SEQTYPE_IMMEDIATE 1
9 #define SEQTYPE_UNSOLICITED 2
10 #define SEQTYPE_NORMAL 3
12 /* struct iscsi_seq->status */
13 #define DATAOUT_SEQUENCE_GOT_R2T 1
14 #define DATAOUT_SEQUENCE_WITHIN_COMMAND_RECOVERY 2
15 #define DATAOUT_SEQUENCE_COMPLETE 3
17 /* iscsi_determine_counts_for_list() type */
18 #define PDULIST_NORMAL 1
19 #define PDULIST_IMMEDIATE 2
20 #define PDULIST_UNSOLICITED 3
21 #define PDULIST_IMMEDIATE_AND_UNSOLICITED 4
23 /* struct iscsi_pdu->type */
24 #define PDUTYPE_IMMEDIATE 1
25 #define PDUTYPE_UNSOLICITED 2
26 #define PDUTYPE_NORMAL 3
28 /* struct iscsi_pdu->status */
29 #define ISCSI_PDU_NOT_RECEIVED 0
30 #define ISCSI_PDU_RECEIVED_OK 1
31 #define ISCSI_PDU_CRC_FAILED 2
32 #define ISCSI_PDU_TIMED_OUT 3
34 /* struct iscsi_build_list->randomize */
35 #define RANDOM_DATAIN_PDU_OFFSETS 0x01
36 #define RANDOM_DATAIN_SEQ_OFFSETS 0x02
37 #define RANDOM_DATAOUT_PDU_OFFSETS 0x04
38 #define RANDOM_R2T_OFFSETS 0x08
40 /* struct iscsi_build_list->data_direction */
41 #define ISCSI_PDU_READ 0x01
42 #define ISCSI_PDU_WRITE 0x02
44 struct iscsi_build_list
{
48 int immediate_data_length
;
60 } ____cacheline_aligned
;
79 } ____cacheline_aligned
;
81 extern int iscsit_build_pdu_and_seq_lists(struct iscsi_cmd
*, u32
);
82 extern struct iscsi_pdu
*iscsit_get_pdu_holder(struct iscsi_cmd
*, u32
, u32
);
83 extern struct iscsi_pdu
*iscsit_get_pdu_holder_for_seq(struct iscsi_cmd
*, struct iscsi_seq
*);
84 extern struct iscsi_seq
*iscsit_get_seq_holder(struct iscsi_cmd
*, u32
, u32
);
86 #endif /* ISCSI_SEQ_AND_PDU_LIST_H */