* [PATCH for-next] IB/mlx5: Fix port counter ID association to QP offset
@ 2016-07-13 13:25 Leon Romanovsky
[not found] ` <1468416311-25643-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2016-07-13 13:25 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Alex Vesker
From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
The q-counter-id is given in modify-QP command associates
the QP with the counter. The offset to which the counter
ID was set is incorrect, causing IB port counters not to
count on QP.
Fixes: 0837e86a7a34 ('IB/mlx5: Add per port counters')
Signed-off-by: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/infiniband/hw/mlx5/qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 5ca14a2..40b2045 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2657,7 +2657,7 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
struct mlx5_ib_port *mibport = &dev->port[port_num];
context->qp_counter_set_usr_page |=
- cpu_to_be32(mibport->q_cnt_id << 16);
+ cpu_to_be32((u32)(mibport->q_cnt_id) << 24);
}
if (!ibqp->uobject && cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1468416311-25643-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>]
* RE: [PATCH for-next] IB/mlx5: Fix port counter ID association to QP offset [not found] ` <1468416311-25643-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> @ 2016-07-13 14:09 ` Mark Bloch [not found] ` <VI1PR05MB1391222EBF9C51484716FC6AD2310-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Mark Bloch @ 2016-07-13 14:09 UTC (permalink / raw) To: Leon Romanovsky, dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alex Vesker > -----Original Message----- > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma- > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Leon Romanovsky > Sent: Wednesday, July 13, 2016 4:25 PM > To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org > Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > Subject: [PATCH for-next] IB/mlx5: Fix port counter ID association to QP > offset > > From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > The q-counter-id is given in modify-QP command associates > the QP with the counter. The offset to which the counter > ID was set is incorrect, causing IB port counters not to > count on QP. > > Fixes: 0837e86a7a34 ('IB/mlx5: Add per port counters') > Signed-off-by: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > --- > drivers/infiniband/hw/mlx5/qp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/mlx5/qp.c > b/drivers/infiniband/hw/mlx5/qp.c > index 5ca14a2..40b2045 100644 > --- a/drivers/infiniband/hw/mlx5/qp.c > +++ b/drivers/infiniband/hw/mlx5/qp.c > @@ -2657,7 +2657,7 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp, > struct mlx5_ib_port *mibport = &dev->port[port_num]; > > context->qp_counter_set_usr_page |= > - cpu_to_be32(mibport->q_cnt_id << 16); > + cpu_to_be32((u32)(mibport->q_cnt_id) << 24); > } > > if (!ibqp->uobject && cur_state == IB_QPS_RESET && new_state == > IB_QPS_INIT) > -- > 2.1.4 > > -- Alex thank for noticing and fixing this. Tested-by: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Mark -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <VI1PR05MB1391222EBF9C51484716FC6AD2310-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>]
* Re: [PATCH for-next] IB/mlx5: Fix port counter ID association to QP offset [not found] ` <VI1PR05MB1391222EBF9C51484716FC6AD2310-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> @ 2016-08-02 18:43 ` Doug Ledford 0 siblings, 0 replies; 3+ messages in thread From: Doug Ledford @ 2016-08-02 18:43 UTC (permalink / raw) To: Mark Bloch, Leon Romanovsky Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alex Vesker [-- Attachment #1: Type: text/plain, Size: 1351 bytes --] On Wed, 2016-07-13 at 14:09 +0000, Mark Bloch wrote: > > > > -----Original Message----- > > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma- > > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Leon Romanovsky > > Sent: Wednesday, July 13, 2016 4:25 PM > > To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org > > Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > Subject: [PATCH for-next] IB/mlx5: Fix port counter ID association > > to QP > > offset > > > > From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > > > The q-counter-id is given in modify-QP command associates > > the QP with the counter. The offset to which the counter > > ID was set is incorrect, causing IB port counters not to > > count on QP. > > > > Fixes: 0837e86a7a34 ('IB/mlx5: Add per port counters') > > Signed-off-by: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > > > Alex thank for noticing and fixing this. > > Tested-by: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Thanks, applied. -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG KeyID: 0E572FDD [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-02 18:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 13:25 [PATCH for-next] IB/mlx5: Fix port counter ID association to QP offset Leon Romanovsky
[not found] ` <1468416311-25643-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-13 14:09 ` Mark Bloch
[not found] ` <VI1PR05MB1391222EBF9C51484716FC6AD2310-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-08-02 18:43 ` Doug Ledford
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox