Blame SOURCES/0164-netdrv-net-mlx5e-Fix-missing-reset-of-SW-metadata-in.patch

d8f823
From b994a9349762bcaad79091144ec96ce7a4b8d5a7 Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Tue, 12 May 2020 10:54:34 -0400
d8f823
Subject: [PATCH 164/312] [netdrv] net/mlx5e: Fix missing reset of SW metadata
d8f823
 in Striding RQ reset
d8f823
d8f823
Message-id: <20200512105530.4207-69-ahleihel@redhat.com>
d8f823
Patchwork-id: 306940
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1789382 068/124] net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset
d8f823
Bugzilla: 1789382
d8f823
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1789382
d8f823
Upstream: v5.6
d8f823
d8f823
commit 39369fd536d485a99a59d8e357c0d4d3ce19a3b8
d8f823
Author: Aya Levin <ayal@mellanox.com>
d8f823
Date:   Thu Mar 12 12:35:32 2020 +0200
d8f823
d8f823
    net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset
d8f823
d8f823
    When resetting the RQ (moving RQ state from RST to RDY), the driver
d8f823
    resets the WQ's SW metadata.
d8f823
    In striding RQ mode, we maintain a field that reflects the actual
d8f823
    expected WQ head (including in progress WQEs posted to the ICOSQ).
d8f823
    It was mistakenly not reset together with the WQ. Fix this here.
d8f823
d8f823
    Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ")
d8f823
    Signed-off-by: Aya Levin <ayal@mellanox.com>
d8f823
    Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
d8f823
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
d8f823
d8f823
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
d8f823
---
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 6 ++++--
d8f823
 1 file changed, 4 insertions(+), 2 deletions(-)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
d8f823
index a226277b0980..f07b1399744e 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
d8f823
@@ -181,10 +181,12 @@ mlx5e_tx_dma_unmap(struct device *pdev, struct mlx5e_sq_dma *dma)
d8f823
 
d8f823
 static inline void mlx5e_rqwq_reset(struct mlx5e_rq *rq)
d8f823
 {
d8f823
-	if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ)
d8f823
+	if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) {
d8f823
 		mlx5_wq_ll_reset(&rq->mpwqe.wq);
d8f823
-	else
d8f823
+		rq->mpwqe.actual_wq_head = 0;
d8f823
+	} else {
d8f823
 		mlx5_wq_cyc_reset(&rq->wqe.wq);
d8f823
+	}
d8f823
 }
d8f823
 
d8f823
 /* SW parser related functions */
d8f823
-- 
d8f823
2.13.6
d8f823