isert: Print error to user if QueuedCommands value exceeds supported maximum

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Yan Burman
2014-03-19 14:30:42 +00:00
parent 1807512bda
commit a89367848e
3 changed files with 8 additions and 1 deletions
+1
View File
@@ -58,6 +58,7 @@ struct isert_wr {
#define ISER_MAX_RDMAS 5
#define ISER_SQ_SIZE 128
#define ISER_MAX_WCE 2048
struct isert_cmnd {
struct iscsi_cmnd iscsi ____cacheline_aligned;
+7
View File
@@ -381,6 +381,13 @@ int isert_alloc_conn_resources(struct isert_connection *isert_conn)
isert_conn->repost_threshold = 32;
to_alloc = isert_conn->queue_depth * 2 + isert_conn->repost_threshold;
if (unlikely(to_alloc > ISER_MAX_WCE)) {
pr_err("QueuedCommands larger than %d not supported\n",
(ISER_MAX_WCE - isert_conn->repost_threshold) / 2);
err = -EINVAL;
goto out;
}
for (i = 0; i < to_alloc; i++) {
pdu = isert_rx_pdu_alloc(isert_conn, t_datasz);
if (unlikely(!pdu)) {
-1
View File
@@ -41,7 +41,6 @@
#include "iser_datamover.h"
#define ISER_CQ_ENTRIES (128 * 1024)
#define ISER_MAX_WCE 2048
#define ISER_LISTEN_BACKLOG 8
static DEFINE_MUTEX(dev_list_mutex);