diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/target/iscsi/iscsi_transport.h | 2 | ||||
-rw-r--r-- | include/target/target_core_backend.h | 2 | ||||
-rw-r--r-- | include/target/target_core_base.h | 33 | ||||
-rw-r--r-- | include/target/target_core_fabric.h | 6 |
4 files changed, 28 insertions, 15 deletions
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 4483fadfa68d..33b487b5da92 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -21,6 +21,8 @@ struct iscsit_transport { int (*iscsit_get_dataout)(struct iscsi_conn *, struct iscsi_cmd *, bool); int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); + void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); + enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); }; static inline void *iscsit_priv_cmd(struct iscsi_cmd *cmd) diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 7020e33e742e..3a1c1eea1fff 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -73,10 +73,12 @@ sense_reason_t sbc_execute_unmap(struct se_cmd *cmd, sense_reason_t (*do_unmap_fn)(struct se_cmd *cmd, void *priv, sector_t lba, sector_t nolb), void *priv); +void sbc_dif_generate(struct se_cmd *); sense_reason_t sbc_dif_verify_write(struct se_cmd *, sector_t, unsigned int, unsigned int, struct scatterlist *, int); sense_reason_t sbc_dif_verify_read(struct se_cmd *, sector_t, unsigned int, unsigned int, struct scatterlist *, int); +sense_reason_t sbc_dif_read_strip(struct se_cmd *); void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 1772fadcff62..9ec9864ecf38 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -162,7 +162,7 @@ enum se_cmd_flags_table { SCF_SENT_CHECK_CONDITION = 0x00000800, SCF_OVERFLOW_BIT = 0x00001000, SCF_UNDERFLOW_BIT = 0x00002000, - SCF_SENT_DELAYED_TAS = 0x00004000, + SCF_SEND_DELAYED_TAS = 0x00004000, SCF_ALUA_NON_OPTIMIZED = 0x00008000, SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00020000, SCF_ACK_KREF = 0x00040000, @@ -442,19 +442,18 @@ struct se_tmr_req { }; enum target_prot_op { - TARGET_PROT_NORMAL = 0, - TARGET_PROT_DIN_INSERT, - TARGET_PROT_DOUT_INSERT, - TARGET_PROT_DIN_STRIP, - TARGET_PROT_DOUT_STRIP, - TARGET_PROT_DIN_PASS, - TARGET_PROT_DOUT_PASS, + TARGET_PROT_NORMAL = 0, + TARGET_PROT_DIN_INSERT = (1 << 0), + TARGET_PROT_DOUT_INSERT = (1 << 1), + TARGET_PROT_DIN_STRIP = (1 << 2), + TARGET_PROT_DOUT_STRIP = (1 << 3), + TARGET_PROT_DIN_PASS = (1 << 4), + TARGET_PROT_DOUT_PASS = (1 << 5), }; -enum target_prot_ho { - PROT_SEPERATED, - PROT_INTERLEAVED, -}; +#define TARGET_PROT_ALL TARGET_PROT_DIN_INSERT | TARGET_PROT_DOUT_INSERT | \ + TARGET_PROT_DIN_STRIP | TARGET_PROT_DOUT_STRIP | \ + TARGET_PROT_DIN_PASS | TARGET_PROT_DOUT_PASS enum target_prot_type { TARGET_DIF_TYPE0_PROT, @@ -463,6 +462,12 @@ enum target_prot_type { TARGET_DIF_TYPE3_PROT, }; +enum target_core_dif_check { + TARGET_DIF_CHECK_GUARD = 0x1 << 0, + TARGET_DIF_CHECK_APPTAG = 0x1 << 1, + TARGET_DIF_CHECK_REFTAG = 0x1 << 2, +}; + struct se_dif_v1_tuple { __be16 guard_tag; __be16 app_tag; @@ -556,13 +561,14 @@ struct se_cmd { /* DIF related members */ enum target_prot_op prot_op; enum target_prot_type prot_type; + u8 prot_checks; u32 prot_length; u32 reftag_seed; struct scatterlist *t_prot_sg; unsigned int t_prot_nents; - enum target_prot_ho prot_handover; sense_reason_t pi_err; sector_t bad_sector; + bool prot_pto; }; struct se_ua { @@ -603,6 +609,7 @@ struct se_node_acl { struct se_session { unsigned sess_tearing_down:1; u64 sess_bin_isid; + enum target_prot_op sup_prot_ops; struct se_node_acl *se_node_acl; struct se_portal_group *se_tpg; void *fabric_sess_ptr; diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 0218d689b3d7..22a4e98eec80 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -62,6 +62,7 @@ struct target_core_fabric_ops { int (*queue_data_in)(struct se_cmd *); int (*queue_status)(struct se_cmd *); void (*queue_tm_rsp)(struct se_cmd *); + void (*aborted_task)(struct se_cmd *); /* * fabric module calls for target_core_fabric_configfs.c */ @@ -83,10 +84,11 @@ struct target_core_fabric_ops { void (*fabric_drop_nodeacl)(struct se_node_acl *); }; -struct se_session *transport_init_session(void); +struct se_session *transport_init_session(enum target_prot_op); int transport_alloc_session_tags(struct se_session *, unsigned int, unsigned int); -struct se_session *transport_init_session_tags(unsigned int, unsigned int); +struct se_session *transport_init_session_tags(unsigned int, unsigned int, + enum target_prot_op); void __transport_register_session(struct se_portal_group *, struct se_node_acl *, struct se_session *, void *); void transport_register_session(struct se_portal_group *, |