linux/drivers/target/iscsi/iscsi_target_seq_pdu_list.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ISCSI_SEQ_AND_PDU_LIST_H
#define ISCSI_SEQ_AND_PDU_LIST_H

#include <linux/types.h>
#include <linux/cache.h>

/* struct iscsi_pdu->status */
#define DATAOUT_PDU_SENT

/* struct iscsi_seq->type */
#define SEQTYPE_IMMEDIATE
#define SEQTYPE_UNSOLICITED
#define SEQTYPE_NORMAL

/* struct iscsi_seq->status */
#define DATAOUT_SEQUENCE_GOT_R2T
#define DATAOUT_SEQUENCE_WITHIN_COMMAND_RECOVERY
#define DATAOUT_SEQUENCE_COMPLETE

/* iscsi_determine_counts_for_list() type */
#define PDULIST_NORMAL
#define PDULIST_IMMEDIATE
#define PDULIST_UNSOLICITED
#define PDULIST_IMMEDIATE_AND_UNSOLICITED

/* struct iscsi_pdu->type */
#define PDUTYPE_IMMEDIATE
#define PDUTYPE_UNSOLICITED
#define PDUTYPE_NORMAL

/* struct iscsi_pdu->status */
#define ISCSI_PDU_NOT_RECEIVED
#define ISCSI_PDU_RECEIVED_OK
#define ISCSI_PDU_CRC_FAILED
#define ISCSI_PDU_TIMED_OUT

/* struct iscsi_build_list->randomize */
#define RANDOM_DATAIN_PDU_OFFSETS
#define RANDOM_DATAIN_SEQ_OFFSETS
#define RANDOM_DATAOUT_PDU_OFFSETS
#define RANDOM_R2T_OFFSETS

/* struct iscsi_build_list->data_direction */
#define ISCSI_PDU_READ
#define ISCSI_PDU_WRITE

struct iscsi_build_list {};

struct iscsi_pdu {} ____cacheline_aligned;

struct iscsi_seq {} ____cacheline_aligned;

struct iscsit_cmd;

extern int iscsit_build_pdu_and_seq_lists(struct iscsit_cmd *, u32);
extern struct iscsi_pdu *iscsit_get_pdu_holder(struct iscsit_cmd *, u32, u32);
extern struct iscsi_pdu *iscsit_get_pdu_holder_for_seq(struct iscsit_cmd *, struct iscsi_seq *);
extern struct iscsi_seq *iscsit_get_seq_holder(struct iscsit_cmd *, u32, u32);

#endif /* ISCSI_SEQ_AND_PDU_LIST_H */