summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_core.h
diff options
context:
space:
mode:
authorSagi Grimberg2014-02-19 16:50:19 +0100
committerNicholas Bellinger2014-04-07 10:48:43 +0200
commit5b168dcd6aa69f7421a7738eada749d376dd1253 (patch)
tree89bf96930fc011263b59a6a8f106285015dac869 /drivers/target/iscsi/iscsi_target_core.h
parentTarget/core: Remove prot_handover use for now (diff)
downloadkernel-qcow2-linux-5b168dcd6aa69f7421a7738eada749d376dd1253.tar.gz
kernel-qcow2-linux-5b168dcd6aa69f7421a7738eada749d376dd1253.tar.xz
kernel-qcow2-linux-5b168dcd6aa69f7421a7738eada749d376dd1253.zip
Target/iscsi: Add T10-PI indication for iscsi_portal_group
In case an iscsi portal group will be defined as t10_pi enabled, all connections on top of it will support protected transactions. T10-PI support may require extra reource allocation and maintenance by the transport layer, so we don't want to apply them on non-t10_pi network portals. This is a hook for the iscsi target layer to signal the transport at connection establishment that this connection will carry protected transactions. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_core.h')
-rw-r--r--drivers/target/iscsi/iscsi_target_core.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target_core.h b/drivers/target/iscsi/iscsi_target_core.h
index 48f7b3bf4e8c..886d74d6f3d4 100644
--- a/drivers/target/iscsi/iscsi_target_core.h
+++ b/drivers/target/iscsi/iscsi_target_core.h
@@ -58,7 +58,8 @@
#define TA_DEMO_MODE_DISCOVERY 1
#define TA_DEFAULT_ERL 0
#define TA_CACHE_CORE_NPS 0
-
+/* T10 protection information disabled by default */
+#define TA_DEFAULT_T10_PI 0
#define ISCSI_IOV_DATA_BUFFER 5
@@ -765,6 +766,7 @@ struct iscsi_tpg_attrib {
u32 prod_mode_write_protect;
u32 demo_mode_discovery;
u32 default_erl;
+ u8 t10_pi;
struct iscsi_portal_group *tpg;
};
@@ -787,6 +789,7 @@ struct iscsi_np {
void *np_context;
struct iscsit_transport *np_transport;
struct list_head np_list;
+ struct iscsi_tpg_np *tpg_np;
} ____cacheline_aligned;
struct iscsi_tpg_np {