Blob Blame History Raw
From 20db6bb321f335b527ccf7befb50c50696e37ebf Mon Sep 17 00:00:00 2001
From: Alaa Hleihel <ahleihel@redhat.com>
Date: Sun, 10 May 2020 14:51:30 -0400
Subject: [PATCH 010/312] [netdrv] net/mlx5e: Tx, Strict the room needed for SQ
 edge NOPs

Message-id: <20200510145245.10054-8-ahleihel@redhat.com>
Patchwork-id: 306547
Patchwork-instance: patchwork
O-Subject: [RHEL8.3 BZ 1789378 v2 07/82] net/mlx5e: Tx, Strict the room needed for SQ edge NOPs
Bugzilla: 1789378
RH-Acked-by: Kamal Heib <kheib@redhat.com>
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
RH-Acked-by: Jonathan Toppins <jtoppins@redhat.com>

Bugzilla: http://bugzilla.redhat.com/1789378
Upstream: v5.4-rc1

commit 68865419ba1bf502a5bd279a500deda64000249d
Author: Tariq Toukan <tariqt@mellanox.com>
Date:   Thu Jul 11 11:20:22 2019 +0300

    net/mlx5e: Tx, Strict the room needed for SQ edge NOPs

    We use NOPs to populate the WQ fragment edge if the WQE does not fit
    in frag, to avoid WQEs crossing a page boundary (or wrap-around the WQ).

    The upper bound on the needed number of NOPs is one WQEBB less than
    the largest possible WQE, for otherwise the WQE would certainly fit.

    Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>

Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
index b495e6a976a1..a7a2cd415e69 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
@@ -6,7 +6,7 @@
 
 #include "en.h"
 
-#define MLX5E_SQ_NOPS_ROOM  MLX5_SEND_WQE_MAX_WQEBBS
+#define MLX5E_SQ_NOPS_ROOM (MLX5_SEND_WQE_MAX_WQEBBS - 1)
 #define MLX5E_SQ_STOP_ROOM (MLX5_SEND_WQE_MAX_WQEBBS +\
 			    MLX5E_SQ_NOPS_ROOM)
 
-- 
2.13.6