From: Thierry Herbelot <[email protected]>

total_length is only visible when SOFT_COUNTERS are enabled

Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
Cc: [email protected]
Cc: [email protected]

Signed-off-by: Thierry Herbelot <[email protected]>
Acked-by: Nelio Laranjeiro <[email protected]>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 9658b3783..2d30c507f 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -524,7 +524,9 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, 
uint16_t pkts_n)
                                                     0,
                                        };
                                        ds = 1;
+#ifdef MLX5_PMD_SOFT_COUNTERS
                                        total_length = 0;
+#endif
                                        k++;
                                        goto next_wqe;
                                }
-- 
2.11.0

Reply via email to