patch 'net/mlx5: fix shared Rx queue limitations' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 19 23:02:12 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/21/26. 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/790b682177aec834200959821f9a718649a860ba

Thanks.

Luca Boccassi

---
>From 790b682177aec834200959821f9a718649a860ba Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski at nvidia.com>
Date: Wed, 18 Feb 2026 09:13:50 +0100
Subject: [PATCH] net/mlx5: fix shared Rx queue limitations

[ upstream commit 568857f18c2ab7cb73e6fd0bf1e612a5f352af26 ]

Affected patch introduced a new Rx burst function to mlx5 PMD
for handling out of order completions which are possible
on shared Rx queues.
This burst function is selected if and only if at least one of
the Rx queues on the device is configured as shared.

This burst function contains only non-vectorized code and is not
compatible with multi packet Rx (MPRQ). Although the function selection
worked correctly, if either vectorized Rx datapath was supported
or MPRQ was enabled, the relevant resources were still initialized.
For example, additional fake mbufs were set up for vectorized Rx
leading to memory leaks.

This patch fixes that by adding additional checks for shared Rx queues
to vectorized and MPRQ support checks.
Shared Rx queue limitations and Rx burst functions info is also amended
in mlx5 PMD documentation.

Fixes: 5f9223611f35 ("net/mlx5: fix out-of-order completions in ordinary Rx burst")

Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_rx.h       | 36 +++++++++++++++++---------------
 drivers/net/mlx5/mlx5_rxtx_vec.c |  2 ++
 2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index f4b5136d60..da3ca00f21 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -582,6 +582,23 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
 	return MLX5_RXQ_CODE_EXIT;
 }
 
+/**
+ * Check whether Shared RQ is enabled for the device.
+ *
+ * @param dev
+ *   Pointer to Ethernet device.
+ *
+ * @return
+ *   0 if disabled, otherwise enabled.
+ */
+static __rte_always_inline int
+mlx5_shared_rq_enabled(struct rte_eth_dev *dev)
+{
+	struct mlx5_priv *priv = dev->data->dev_private;
+
+	return !LIST_EMPTY(&priv->sh->shared_rxqs);
+}
+
 /**
  * Check whether Multi-Packet RQ can be enabled for the device.
  *
@@ -596,6 +613,8 @@ mlx5_check_mprq_support(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 
+	if (mlx5_shared_rq_enabled(dev))
+		return -ENOTSUP;
 	if (priv->config.mprq.enabled &&
 	    priv->rxqs_n >= priv->config.mprq.min_rxqs_num)
 		return 1;
@@ -651,23 +670,6 @@ mlx5_mprq_enabled(struct rte_eth_dev *dev)
 	return n == n_ibv;
 }
 
-/**
- * Check whether Shared RQ is enabled for the device.
- *
- * @param dev
- *   Pointer to Ethernet device.
- *
- * @return
- *   0 if disabled, otherwise enabled.
- */
-static __rte_always_inline int
-mlx5_shared_rq_enabled(struct rte_eth_dev *dev)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-
-	return !LIST_EMPTY(&priv->sh->shared_rxqs);
-}
-
 /**
  * Check whether given RxQ is external.
  *
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index 1b701801c5..79e92811d5 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -606,6 +606,8 @@ mlx5_rxq_check_vec_support(struct mlx5_rxq_data *rxq)
 
 	if (!RXQ_PORT(ctrl)->config.rx_vec_en || rxq->sges_n != 0)
 		return -ENOTSUP;
+	if (mlx5_shared_rq_enabled(RXQ_DEV(ctrl)))
+		return -ENOTSUP;
 	if (rxq->lro)
 		return -ENOTSUP;
 	return 1;
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 22:00:48.556308950 +0000
+++ 0020-net-mlx5-fix-shared-Rx-queue-limitations.patch	2026-03-19 22:00:47.798359367 +0000
@@ -1 +1 @@
-From 568857f18c2ab7cb73e6fd0bf1e612a5f352af26 Mon Sep 17 00:00:00 2001
+From 790b682177aec834200959821f9a718649a860ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 568857f18c2ab7cb73e6fd0bf1e612a5f352af26 ]
+
@@ -25 +26,0 @@
-Cc: stable at dpdk.org
@@ -30,2 +31 @@
- doc/guides/nics/mlx5.rst         | 41 +++++++++++++++++++-------------
- drivers/net/mlx5/mlx5_rx.h       | 36 +++++++++++++++-------------
+ drivers/net/mlx5/mlx5_rx.h       | 36 +++++++++++++++++---------------
@@ -33 +33 @@
- 3 files changed, 46 insertions(+), 33 deletions(-)
+ 2 files changed, 21 insertions(+), 17 deletions(-)
@@ -35,64 +34,0 @@
-diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index 2529c2f4c8..9dcc93cc23 100644
---- a/doc/guides/nics/mlx5.rst
-+++ b/doc/guides/nics/mlx5.rst
-@@ -956,27 +956,32 @@ The Rx function is selected based on multiple parameters:
- - :ref:`multi-packet Rx queues (MPRQ) <mlx5_mprq_params>`
- - :ref:`vectorized Rx datapath <mlx5_rx_vec_param>`
- 
--This parameter may also have an impact on the behavior:
-+These configurations may also have an impact on the behavior:
- 
- - :ref:`packet descriptor (CQE) compression <mlx5_cqe_comp_param>`
-+- :ref:`shared Rx queue <mlx5_shared_rx>`
- 
- .. table:: Rx burst functions
- 
--   +-------------------+------------------------+---------+-----------------+------+-------+
--   || Function Name    || Parameters to Enable  || Scatter|| Error Recovery || CQE || Large|
--   |                   |                        |         |                 || comp|| MTU  |
--   +===================+========================+=========+=================+======+=======+
--   | rx_burst          | rx_vec_en=0            |   Yes   | Yes             |  Yes |  Yes  |
--   +-------------------+------------------------+---------+-----------------+------+-------+
--   | rx_burst_vec      | rx_vec_en=1 (default)  |   No    | if CQE comp off |  Yes |  No   |
--   +-------------------+------------------------+---------+-----------------+------+-------+
--   | rx_burst_mprq     || mprq_en=1             |   No    | Yes             |  Yes |  Yes  |
--   |                   || RxQs >= rxqs_min_mprq |         |                 |      |       |
--   +-------------------+------------------------+---------+-----------------+------+-------+
--   | rx_burst_mprq_vec || rx_vec_en=1 (default) |   No    | if CQE comp off |  Yes |  Yes  |
--   |                   || mprq_en=1             |         |                 |      |       |
--   |                   || RxQs >= rxqs_min_mprq |         |                 |      |       |
--   +-------------------+------------------------+---------+-----------------+------+-------+
-+   +-------------------+------------------------+---------+-----------------+------+-------+---------+
-+   || Function Name    || Parameters to Enable  || Scatter|| Error Recovery || CQE || Large|| Shared |
-+   |                   |                        |         |                 || comp|| MTU  |  RxQ    |
-+   +===================+========================+=========+=================+======+=======+=========+
-+   | rx_burst          | rx_vec_en=0            |   Yes   | Yes             |  Yes |  Yes  | No      |
-+   +-------------------+------------------------+---------+-----------------+------+-------+---------+
-+   | rx_burst_vec      | rx_vec_en=1 (default)  |   No    | if CQE comp off |  Yes |  No   | No      |
-+   +-------------------+------------------------+---------+-----------------+------+-------+---------+
-+   | rx_burst_mprq     || mprq_en=1             |   No    | Yes             |  Yes |  Yes  | No      |
-+   |                   || RxQs >= rxqs_min_mprq |         |                 |      |       |         |
-+   +-------------------+------------------------+---------+-----------------+------+-------+---------+
-+   | rx_burst_mprq_vec || rx_vec_en=1 (default) |   No    | if CQE comp off |  Yes |  Yes  | No      |
-+   |                   || mprq_en=1             |         |                 |      |       |         |
-+   |                   || RxQs >= rxqs_min_mprq |         |                 |      |       |         |
-+   +-------------------+------------------------+---------+-----------------+------+-------+---------+
-+   | rx_burst          | at least one Rx queue  |   Yes   | Yes             |  Yes |  Yes  | Yes     |
-+   |  (out of order)   | on the device          |         |                 |      |       |         |
-+   |                   | is shared              |         |                 |      |       |         |
-+   +-------------------+------------------------+---------+-----------------+------+-------+---------+
- 
- 
- Rx/Tx Tuning
-@@ -1829,6 +1834,10 @@ Shared Rx Queue
- Limitations
- ^^^^^^^^^^^
- 
-+#. Shared Rx queue is not compatible with both vectorized Rx datapath and multi-packet Rx queues.
-+   Any configuration related to these features passed through device arguments
-+   will be ignored.
-+
- #. Counters of received packets and bytes of devices in the same share group are same.
- 
- #. Counters of received packets and bytes of queues in the same group and queue ID are same.
@@ -100 +36 @@
-index 86636d598f..dffab3955b 100644
+index f4b5136d60..da3ca00f21 100644
@@ -103 +39 @@
-@@ -602,6 +602,23 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
+@@ -582,6 +582,23 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
@@ -127 +63 @@
-@@ -616,6 +633,8 @@ mlx5_check_mprq_support(struct rte_eth_dev *dev)
+@@ -596,6 +613,8 @@ mlx5_check_mprq_support(struct rte_eth_dev *dev)
@@ -136 +72 @@
-@@ -671,23 +690,6 @@ mlx5_mprq_enabled(struct rte_eth_dev *dev)
+@@ -651,23 +670,6 @@ mlx5_mprq_enabled(struct rte_eth_dev *dev)


More information about the stable mailing list