netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper
@ 2018-07-24 11:27 Tariq Toukan
  2018-07-24 23:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tariq Toukan @ 2018-07-24 11:27 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Jack Morgenstein, Tariq Toukan

From: Jack Morgenstein <jackm@dev.mellanox.co.il>

Function mlx4_RST2INIT_QP_wrapper saved the qp number passed in the qp
context, rather than the one passed in the input modifier.

However, the qp number in the qp context is not defined as a
required parameter by the FW. Therefore, drivers may choose to not
specify the qp number in the qp context for the reset-to-init transition.

Thus, we must save the qp number passed in the command input modifier --
which is always present. (This saved qp number is used as the input
modifier for command 2RST_QP when a slave's qp's are destroyed).

Fixes: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Dave, please queue for -stable.

diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 7b1b5ac986d0..31bd56727022 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2958,7 +2958,7 @@ int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,
 	u32 srqn = qp_get_srqn(qpc) & 0xffffff;
 	int use_srq = (qp_get_srqn(qpc) >> 24) & 1;
 	struct res_srq *srq;
-	int local_qpn = be32_to_cpu(qpc->local_qpn) & 0xffffff;
+	int local_qpn = vhcr->in_modifier & 0xffffff;
 
 	err = adjust_qp_sched_queue(dev, slave, qpc, inbox);
 	if (err)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper
  2018-07-24 11:27 [PATCH net] net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper Tariq Toukan
@ 2018-07-24 23:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-24 23:31 UTC (permalink / raw)
  To: tariqt; +Cc: netdev, eranbe, jackm

From: Tariq Toukan <tariqt@mellanox.com>
Date: Tue, 24 Jul 2018 14:27:55 +0300

> From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> 
> Function mlx4_RST2INIT_QP_wrapper saved the qp number passed in the qp
> context, rather than the one passed in the input modifier.
> 
> However, the qp number in the qp context is not defined as a
> required parameter by the FW. Therefore, drivers may choose to not
> specify the qp number in the qp context for the reset-to-init transition.
> 
> Thus, we must save the qp number passed in the command input modifier --
> which is always present. (This saved qp number is used as the input
> modifier for command 2RST_QP when a slave's qp's are destroyed).
> 
> Fixes: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests")
> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> Signed-off-by: Tariq Toukan <tariqt@mellanox.com>

Applied and queued up for -stable, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-25  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 11:27 [PATCH net] net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper Tariq Toukan
2018-07-24 23:31 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).