Skip to contentSkip to conversation

net/mlx5: forbid MPRQ restart

PATCH In review Alexander Kozyrev 3 participants 3 messages Jul 3, 2023 – Jul 4, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: forbid MPRQ restart

The queue restart is only supported by the non-vectorized single-packet receive queue today. Restarting MPRQ will result in corrupted packets because of CQE and WQE mismatch. Prevent this by not allowing the MPRQ Rx queue stop.

Fixes 161d103b23 ("net/mlx5: add queue start and stop")
---
 drivers/net/mlx5/mlx5_rxq.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +5 -5
index ad8fd13cbe..b314c0482b 100644
@@ -531,12 +531,12 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 	 * synchronized, that might be broken on RQ restart
 	 * and cause Rx malfunction, so queue stopping is
 	 * not supported if vectorized Rx burst is engaged.
-	 * The routine pointer depends on the process
-	 * type, should perform check there.
+	 * The routine pointer depends on the process type,
+	 * should perform check there. MPRQ is not supported as well.
 	 */
-	if (pkt_burst == mlx5_rx_burst_vec) {
-		DRV_LOG(ERR, "Rx queue stop is not supported "
-			"for vectorized Rx");
+	if (pkt_burst != mlx5_rx_burst) {
+		DRV_LOG(ERR, "Rx queue stop is only supported "
+			"for non-vectorized single-packet Rx");
 		rte_errno = EINVAL;
 		return -EINVAL;
 	}
Signature · 1 line
2.18.2
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines

-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Tuesday, July 4, 2023 12:22 AM
To: [email protected]
Cc: Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: forbid MPRQ restart

The queue restart is only supported by the non-vectorized single-packet receive queue today. Restarting MPRQ will result in corrupted packets because of CQE and WQE mismatch.
Prevent this by not allowing the MPRQ Rx queue stop.

Quoted 4 lines
Fixes 161d103b23 ("net/mlx5: add queue start and stop")
#2 lore raw
In reply to Alexander Kozyrev

Hi,

Quoted 14 lines

-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Tuesday, July 4, 2023 12:22 AM
To: [email protected]
Cc: Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: forbid MPRQ restart

The queue restart is only supported by the non-vectorized single-packet receive queue today. Restarting MPRQ will result in corrupted packets because of CQE and WQE mismatch.
Prevent this by not allowing the MPRQ Rx queue stop.

Quoted 4 lines
Fixes 161d103b23 ("net/mlx5: add queue start and stop")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh