[dpdk-stable] patch 'net/mlx5: fix threshold for mbuf replenishment in MPRQ' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:52:31 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4c8e04c056161a86aebf34fc1a6e5200b05d0283

Thanks.

Luca Boccassi

---
>From 4c8e04c056161a86aebf34fc1a6e5200b05d0283 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev at nvidia.com>
Date: Tue, 13 Jul 2021 18:21:12 +0300
Subject: [PATCH] net/mlx5: fix threshold for mbuf replenishment in MPRQ

[ upstream commit acc87479535cdf02cd63d32a0618bd3874531eb4 ]

The replenishment scheme for the vectorized MPRQ Rx burst aims
to improve the cache locality by allocating new mbufs only when
there are almost no mbufs left: one burst gap between allocated
and consumed indexes.

This gap is not big enough to accommodate a corner case when we
have a very aggressive CQE compression with multiple regular CQEs
at the beginning and 64 zipped CQEs at the end.

Need to keep in mind this case and extend the replenishment
threshold by MLX5_VPMD_RX_MAX_BURST (64) to avoid mbuf overflow.

Fixes: 5fc2e5c27d6 ("net/mlx5: fix mbuf overflow in vectorized MPRQ")

Signed-off-by: Alexander Kozyrev <akozyrev at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index 028e0f6121..b8b555690e 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -151,7 +151,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)
 	unsigned int i;
 
 	if (n >= rxq->rq_repl_thresh &&
-	    rxq->elts_ci - rxq->rq_pi <= rxq->rq_repl_thresh) {
+	    rxq->elts_ci - rxq->rq_pi <=
+	    rxq->rq_repl_thresh + MLX5_VPMD_RX_MAX_BURST) {
 		MLX5_ASSERT(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(elts_n));
 		MLX5_ASSERT(MLX5_VPMD_RXQ_RPLNSH_THRESH(elts_n) >
 			     MLX5_VPMD_DESCS_PER_LOOP);
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:16.358237489 +0100
+++ 0008-net-mlx5-fix-threshold-for-mbuf-replenishment-in-MPR.patch	2021-07-26 13:53:15.797291529 +0100
@@ -1 +1 @@
-From acc87479535cdf02cd63d32a0618bd3874531eb4 Mon Sep 17 00:00:00 2001
+From 4c8e04c056161a86aebf34fc1a6e5200b05d0283 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acc87479535cdf02cd63d32a0618bd3874531eb4 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index e64ef70181..e1b6d5422a 100644
+index 028e0f6121..b8b555690e 100644
@@ -31 +32 @@
-@@ -157,7 +157,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)
+@@ -151,7 +151,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)


More information about the stable mailing list