diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-03-05 21:43:48 +0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-18 09:33:58 +0400 |
commit | 177e31bd5a40999028f6694623ceea1bec5abff6 (patch) | |
tree | 851325a413c642824ae6763fa16ab65dec62c6d2 /drivers/infiniband/ulp/iser/iscsi_iser.h | |
parent | 6b5a8fb0d22f95fff1eefe1545aa2c7771cacc3f (diff) | |
download | linux-177e31bd5a40999028f6694623ceea1bec5abff6.tar.xz |
IB/iser: Support T10-PI operations
Add logic to initialize protection information entities. Upon each
iSCSI task, we keep the scsi_cmnd in order to query the scsi
protection operations and reference to protection buffers.
Modify iser_fast_reg_mr to receive indication whether it is
registering the data or protection buffers.
In addition introduce iser_reg_sig_mr which performs fast registration
work-request for a signature enabled memory region
(IB_WR_REG_SIG_MR). In this routine we set all the protection
relevants for the device to offload protection data-transfer and
verification.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Alex Tabachnik <alext@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.h')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index 99fc8b899648..fce54092d300 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h @@ -46,6 +46,8 @@ #include <linux/printk.h> #include <scsi/libiscsi.h> #include <scsi/scsi_transport_iscsi.h> +#include <scsi/scsi_cmnd.h> +#include <scsi/scsi_device.h> #include <linux/interrupt.h> #include <linux/wait.h> @@ -289,6 +291,10 @@ struct iser_device { enum iser_data_dir cmd_dir); }; +#define ISER_CHECK_GUARD 0xc0 +#define ISER_CHECK_REFTAG 0x0f +#define ISER_CHECK_APPTAG 0x30 + enum iser_reg_indicator { ISER_DATA_KEY_VALID = 1 << 0, ISER_PROT_KEY_VALID = 1 << 1, @@ -361,11 +367,14 @@ struct iscsi_iser_task { struct iser_tx_desc desc; struct iscsi_iser_conn *iser_conn; enum iser_task_status status; + struct scsi_cmnd *sc; int command_sent; /* set if command sent */ int dir[ISER_DIRS_NUM]; /* set if dir use*/ struct iser_regd_buf rdma_regd[ISER_DIRS_NUM];/* regd rdma buf */ struct iser_data_buf data[ISER_DIRS_NUM]; /* orig. data des*/ struct iser_data_buf data_copy[ISER_DIRS_NUM];/* contig. copy */ + struct iser_data_buf prot[ISER_DIRS_NUM]; /* prot desc */ + struct iser_data_buf prot_copy[ISER_DIRS_NUM];/* prot copy */ }; struct iser_page_vec { |