diff options
author | Alex Tabachnik <alext@mellanox.com> | 2014-03-05 19:43:46 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-17 22:33:58 -0700 |
commit | 7f73384752af3caf0756cf807b2f7fbac50982d1 (patch) | |
tree | cc18e0c1ced14f344c95ed78eba17f06a507b360 /drivers/infiniband/ulp/iser/iscsi_iser.c | |
parent | 5f588e3d0c9483ef2fd35f7fe5e104f236b704f8 (diff) | |
download | linux-7f73384752af3caf0756cf807b2f7fbac50982d1.tar.gz linux-7f73384752af3caf0756cf807b2f7fbac50982d1.tar.bz2 linux-7f73384752af3caf0756cf807b2f7fbac50982d1.zip |
IB/iser: Introduce pi_enable, pi_guard module parameters
Use modparams to activate protection information support.
pi_enable bool: Based on this parameter iSER will know if it should
support T10-PI. We don't want to do this by default as it requires to
allocate and initialize extra resources. In case pi_enable=N, iSER
won't publish to SCSI midlayer any DIF capabilities.
pi_guard int: Based on this parameter iSER will publish DIX guard type
support to SCSI midlayer. 0 means CRC is allowed to be passed in DIX
buffers, 1 (or non-zero) means IP-CSUM is allowed to be passed in DIX
buffers. Note that over the wire, only CRC is allowed.
In the next phase, it is worth considering passing these parameters
from iscsid via nlmsg. This will allow these parameters to be
connection based rather than global.
Signed-off-by: Alex Tabachnik <alext@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index dd03cfe596d6..cfa952e9ac90 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -82,6 +82,8 @@ static unsigned int iscsi_max_lun = 512; module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO); int iser_debug_level = 0; +bool iser_pi_enable = false; +int iser_pi_guard = 0; MODULE_DESCRIPTION("iSER (iSCSI Extensions for RDMA) Datamover"); MODULE_LICENSE("Dual BSD/GPL"); @@ -91,6 +93,12 @@ MODULE_VERSION(DRV_VER); module_param_named(debug_level, iser_debug_level, int, 0644); MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0 (default:disabled)"); +module_param_named(pi_enable, iser_pi_enable, bool, 0644); +MODULE_PARM_DESC(pi_enable, "Enable T10-PI offload support (default:disabled)"); + +module_param_named(pi_guard, iser_pi_guard, int, 0644); +MODULE_PARM_DESC(pi_guard, "T10-PI guard_type, 0:CRC|1:IP_CSUM (default:CRC)"); + struct iser_global ig; void |