Skip to contentSkip to conversation

Patch "IB/mlx5: Fix returned values of query QP" has been added to the 3.14-stable tree

PATCH [email protected] 1 participant 1 message Aug 18, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

IB/mlx5: Fix returned values of query QP

to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ib-mlx5-fix-returned-values-of-query-qp.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 0540d8148d419bf769e5aa99c77027febd8922f0 Mon Sep 17 00:00:00 2001

From: Noa Osherovich <[email protected]>
Date: Sat, 4 Jun 2016 15:15:32 +0300
Subject: IB/mlx5: Fix returned values of query QP

From: Noa Osherovich <[email protected]>

commit 0540d8148d419bf769e5aa99c77027febd8922f0 upstream.

Some variables were not initialized properly: max_recv_wr, max_recv_sge, max_send_wr, qp_context and max_inline_data.

Fixes e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB...')
---
 drivers/infiniband/hw/mlx5/qp.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/infiniband/hw/mlx5/qp.c +9 -5
@@ -169,6 +169,8 @@ static int set_rq_size(struct mlx5_ib_de
 		qp->rq.max_gs = 0;
 		qp->rq.wqe_cnt = 0;
 		qp->rq.wqe_shift = 0;
+		cap->max_recv_wr = 0;
+		cap->max_recv_sge = 0;
 	} else {
 		if (ucmd) {
 			qp->rq.wqe_cnt = ucmd->rq_wqe_count;
@@ -2503,17 +2505,19 @@ int mlx5_ib_query_qp(struct ib_qp *ibqp,
 	qp_attr->cap.max_recv_sge    = qp->rq.max_gs;
 
 	if (!ibqp->uobject) {
-		qp_attr->cap.max_send_wr  = qp->sq.wqe_cnt;
+		qp_attr->cap.max_send_wr  = qp->sq.max_post;
 		qp_attr->cap.max_send_sge = qp->sq.max_gs;
+		qp_init_attr->qp_context = ibqp->qp_context;
 	} else {
 		qp_attr->cap.max_send_wr  = 0;
 		qp_attr->cap.max_send_sge = 0;
 	}
 
-	/* We don't support inline sends for kernel QPs (yet), and we
-	 * don't know what userspace's value should be.
-	 */
-	qp_attr->cap.max_inline_data = 0;
+	qp_init_attr->qp_type = ibqp->qp_type;
+	qp_init_attr->recv_cq = ibqp->recv_cq;
+	qp_init_attr->send_cq = ibqp->send_cq;
+	qp_init_attr->srq = ibqp->srq;
+	qp_attr->cap.max_inline_data = qp->max_inline_data;
 
 	qp_init_attr->cap	     = qp_attr->cap;
 

Patches currently in stable-queue which might be from [email protected] are

queue-3.14/ib-mlx5-fix-returned-values-of-query-qp.patch queue-3.14/ib-mlx5-fix-entries-checks-in-mlx5_ib_create_cq.patch