diff --git a/iscsi-scst/kernel/isert-scst/iser_hdr.h b/iscsi-scst/kernel/isert-scst/iser_hdr.h index 69461eb6e..308bbf14a 100644 --- a/iscsi-scst/kernel/isert-scst/iser_hdr.h +++ b/iscsi-scst/kernel/isert-scst/iser_hdr.h @@ -58,5 +58,7 @@ struct isert_hdr { #define ISER_HDRS_SZ (sizeof(struct isert_hdr) + sizeof(struct iscsi_hdr)) +#define ISER_MAX_LOGIN_RDSL (ISCSI_LOGIN_MAX_RDSL + ISER_HDRS_SZ) + #endif diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 468741e9b..64d2f2a1a 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -1015,7 +1015,7 @@ static int isert_conn_qp_create(struct isert_connection *isert_conn) WARN_ON(isert_conn->max_sge < 1); qp_attr.cap.max_send_sge = isert_conn->max_sge; - qp_attr.cap.max_recv_sge = 2; + qp_attr.cap.max_recv_sge = 3; qp_attr.sq_sig_type = IB_SIGNAL_REQ_WR; qp_attr.qp_type = IB_QPT_RC; @@ -1089,7 +1089,7 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id, spin_lock_init(&isert_conn->post_recv_lock); isert_conn->login_req_pdu = isert_rx_pdu_alloc(isert_conn, - ISCSI_LOGIN_MAX_RDSL); + ISER_MAX_LOGIN_RDSL); if (unlikely(!isert_conn->login_req_pdu)) { pr_err("Failed to init login req rx pdu\n"); err = -ENOMEM; @@ -1097,7 +1097,7 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id, } isert_conn->login_rsp_pdu = isert_tx_pdu_alloc(isert_conn, - ISCSI_LOGIN_MAX_RDSL); + ISER_MAX_LOGIN_RDSL); if (unlikely(!isert_conn->login_rsp_pdu)) { pr_err("Failed to init login rsp tx pdu\n"); err = -ENOMEM; diff --git a/iscsi-scst/kernel/isert-scst/isert.h b/iscsi-scst/kernel/isert-scst/isert.h index af7c713af..178b2284f 100644 --- a/iscsi-scst/kernel/isert-scst/isert.h +++ b/iscsi-scst/kernel/isert-scst/isert.h @@ -112,7 +112,7 @@ struct isert_conn_dev { size_t write_len; char *write_buf; void *sg_virt; - struct page *pages[DIV_ROUND_UP(ISCSI_LOGIN_MAX_RDSL, PAGE_SIZE)]; + struct page *pages[DIV_ROUND_UP(ISER_MAX_LOGIN_RDSL, PAGE_SIZE)]; enum isert_conn_dev_state state; int is_discovery; struct timer_list tmo_timer;