mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 06:06:23 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user