Commit b012f0ad authored by Md Haris Iqbal's avatar Md Haris Iqbal Committed by Jason Gunthorpe

RDMA/rtrs: RDMA_RXE requires more number of WR

When using rdma_rxe, post_one_recv() returns ENOMEM error due to the full
recv queue.  This patch increase the number of WR for receive queue to
support all devices.

Link: https://lore.kernel.org/r/20210614090337.29557-4-jinpu.wang@ionos.comSigned-off-by: default avatarMd Haris Iqbal <haris.iqbal@cloud.ionos.com>
Signed-off-by: default avatarJack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: default avatarGioh Kim <gi-oh.kim@ionos.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 0509ebfa
...@@ -1579,10 +1579,11 @@ static int create_con_cq_qp(struct rtrs_clt_con *con) ...@@ -1579,10 +1579,11 @@ static int create_con_cq_qp(struct rtrs_clt_con *con)
lockdep_assert_held(&con->con_mutex); lockdep_assert_held(&con->con_mutex);
if (con->c.cid == 0) { if (con->c.cid == 0) {
/* /*
* One completion for each receive and two for each send * Two (request + registration) completion for send
* (send request + registration) * Two for recv if always_invalidate is set on server
* or one for recv.
* + 2 for drain and heartbeat * + 2 for drain and heartbeat
* in case qp gets into error state * in case qp gets into error state.
*/ */
max_send_wr = SERVICE_CON_QUEUE_DEPTH * 2 + 2; max_send_wr = SERVICE_CON_QUEUE_DEPTH * 2 + 2;
max_recv_wr = SERVICE_CON_QUEUE_DEPTH * 2 + 2; max_recv_wr = SERVICE_CON_QUEUE_DEPTH * 2 + 2;
......
...@@ -1656,7 +1656,7 @@ static int create_con(struct rtrs_srv_sess *sess, ...@@ -1656,7 +1656,7 @@ static int create_con(struct rtrs_srv_sess *sess,
* + 2 for drain and heartbeat * + 2 for drain and heartbeat
*/ */
max_send_wr = SERVICE_CON_QUEUE_DEPTH * 2 + 2; max_send_wr = SERVICE_CON_QUEUE_DEPTH * 2 + 2;
max_recv_wr = SERVICE_CON_QUEUE_DEPTH + 2; max_recv_wr = SERVICE_CON_QUEUE_DEPTH * 2 + 2;
cq_size = max_send_wr + max_recv_wr; cq_size = max_send_wr + max_recv_wr;
} else { } else {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment