IB/isert: Align target max I/O size to initiator size
authorMax Gurtovoy <mgurtovoy@nvidia.com>
Mon, 24 May 2021 08:52:15 +0000 (11:52 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 24 Jun 2021 12:07:53 +0000 (09:07 -0300)
Since the Linux iser initiator default max I/O size set to 512KB and since
there is no handshake procedure for this size in iser protocol, set the
default max IO size of the target to 512KB as well.

For changing the default values, there is a module parameter for both
drivers.

Link: https://lore.kernel.org/r/20210524085215.29005-1-mgurtovoy@nvidia.com
Reviewed-by: Alaa Hleihel <alaa@nvidia.com>
Reviewed-by: Israel Rukshin <israelr@nvidia.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h

index 8634c83067da0e3946b0e97126e9c86776b462ff..636d590765f9578c0ff595cdf74b79400bfa66ed 100644 (file)
@@ -35,10 +35,10 @@ static const struct kernel_param_ops sg_tablesize_ops = {
        .get = param_get_int,
 };
 
-static int isert_sg_tablesize = ISCSI_ISER_DEF_SG_TABLESIZE;
+static int isert_sg_tablesize = ISCSI_ISER_MIN_SG_TABLESIZE;
 module_param_cb(sg_tablesize, &sg_tablesize_ops, &isert_sg_tablesize, 0644);
 MODULE_PARM_DESC(sg_tablesize,
-                "Number of gather/scatter entries in a single scsi command, should >= 128 (default: 256, max: 4096)");
+                "Number of gather/scatter entries in a single scsi command, should >= 128 (default: 128, max: 4096)");
 
 static DEFINE_MUTEX(device_list_mutex);
 static LIST_HEAD(device_list);
index 6c5af13db4e0d286ff718ac7bfa038e1e2ffaa8d..ca8cfebe26ca78fd18203c66eafb5c7cc6619f04 100644 (file)
@@ -65,9 +65,6 @@
  */
 #define ISER_RX_SIZE           (ISCSI_DEF_MAX_RECV_SEG_LEN + 1024)
 
-/* Default I/O size is 1MB */
-#define ISCSI_ISER_DEF_SG_TABLESIZE 256
-
 /* Minimum I/O size is 512KB */
 #define ISCSI_ISER_MIN_SG_TABLESIZE 128