All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Gurtovoy <mgurtovoy@nvidia.com>
To: <linux-rdma@vger.kernel.org>, <dledford@redhat.com>,
	<jgg@nvidia.com>, <leonro@nvidia.com>, <sagi@grimberg.me>
Cc: <oren@nvidia.com>, <nitzanc@nvidia.com>, <sergeygo@nvidia.com>,
	<ngottlieb@nvidia.com>, Max Gurtovoy <mgurtovoy@nvidia.com>,
	Israel Rukshin <israelr@nvidia.com>
Subject: [PATCH 3/4] IB/iser: enforce iser_max_sectors to be greater than 0
Date: Mon, 11 Jan 2021 14:57:53 +0000	[thread overview]
Message-ID: <20210111145754.56727-4-mgurtovoy@nvidia.com> (raw)
In-Reply-To: <20210111145754.56727-1-mgurtovoy@nvidia.com>

A value of 0 will casue the driver to fail establishing a valid
connection to remote target.

The following can be seen in the log in this case:
"
iser: iser_connect: connecting to: 1.1.1.88:3260
iser: iser_cma_handler: address resolved (0): status 0 conn 00000000090aa4de id 00000000167d3b5a
iser: iser_cma_handler: route resolved  (2): status 0 conn 00000000090aa4de id 00000000167d3b5a
iser: iscsi_iser_ep_poll: iser conn 00000000090aa4de rc = 0
iser: iser_create_ib_conn_res: setting conn 00000000090aa4de cma_id 00000000167d3b5a qp 00000000efa80660 max_send_wr 4619
iser_cma_handler: established (9): status 0 conn 00000000090aa4de id 00000000167d3b5a
iser: iser_connected_handler: remote qpn:1c7 my qpn:1c6
iser: iser_connected_handler: conn 00000000090aa4de: negotiated remote invalidation
iser: iscsi_iser_ep_poll: iser conn 00000000090aa4de rc = 1
scsi host10: iSCSI Initiator over iSER
mlx5_core 0000:07:00.0: mlx5_cmd_check:769:(pid 616473): CREATE_MKEY(0x200) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x3bf6f)
iser: iser_create_fastreg_desc: Failed to allocate ib_fast_reg_mr err=-22
iser: iser_alloc_rx_descriptors: failed allocating rx descriptors / data buffers
iser: iscsi_iser_ep_disconnect: ep 00000000d2040785 iser conn 00000000090aa4de
iser: iser_conn_terminate: iser_conn 00000000090aa4de state 3
iser: iser_free_ib_conn_res: freeing conn 00000000090aa4de cma_id 00000000167d3b5a qp 00000000efa80660
iser: iser_device_try_release: device 00000000dc871b1b refcount 0
"

Reviewed-by: Israel Rukshin <israelr@nvidia.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
 drivers/infiniband/ulp/iser/iscsi_iser.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 906f52873d63..fcfdeb5dea42 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -100,8 +100,9 @@ module_param_cb(max_lun, &iscsi_iser_size_ops, &iscsi_max_lun, S_IRUGO);
 MODULE_PARM_DESC(max_lun, "Max LUNs to allow per session, should > 0 (default:512)");
 
 unsigned int iser_max_sectors = ISER_DEF_MAX_SECTORS;
-module_param_named(max_sectors, iser_max_sectors, uint, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(max_sectors, "Max number of sectors in a single scsi command (default:1024");
+module_param_cb(max_sectors, &iscsi_iser_size_ops, &iser_max_sectors,
+		S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(max_sectors, "Max number of sectors in a single scsi command, should > 0 (default:1024)");
 
 bool iser_always_reg = true;
 module_param_named(always_register, iser_always_reg, bool, S_IRUGO);
-- 
2.25.4


  parent reply	other threads:[~2021-01-11 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 14:57 [PATCH 0/4] IB/iser cleanups and fixes for 5.11 Max Gurtovoy
2021-01-11 14:57 ` [PATCH 1/4] IB/iser: remove unneeded semicolons Max Gurtovoy
2021-01-14  0:00   ` Sagi Grimberg
2021-01-11 14:57 ` [PATCH 2/4] IB/iser: protect iscsi_max_lun module param using callback Max Gurtovoy
2021-01-14  0:00   ` Sagi Grimberg
2021-01-11 14:57 ` Max Gurtovoy [this message]
2021-01-14  0:02   ` [PATCH 3/4] IB/iser: enforce iser_max_sectors to be greater than 0 Sagi Grimberg
2021-01-11 14:57 ` [PATCH 4/4] IB/iser: simplify prot_caps setting Max Gurtovoy
2021-01-14  0:03   ` Sagi Grimberg
2021-01-20  0:10 ` [PATCH 0/4] IB/iser cleanups and fixes for 5.11 Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210111145754.56727-4-mgurtovoy@nvidia.com \
    --to=mgurtovoy@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=israelr@nvidia.com \
    --cc=jgg@nvidia.com \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ngottlieb@nvidia.com \
    --cc=nitzanc@nvidia.com \
    --cc=oren@nvidia.com \
    --cc=sagi@grimberg.me \
    --cc=sergeygo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.