From: Alexander Kozyrev <akozyrev@nvidia.com>
To: <dev@dpdk.org>
Cc: <matan@nvidia.com>, <rasland@nvidia.com>,
<viacheslavo@nvidia.com>, <stable@dpdk.org>
Subject: [PATCH] net/mlx5: forbid MPRQ restart
Date: Tue, 4 Jul 2023 00:22:24 +0300 [thread overview]
Message-ID: <20230703212224.2370414-1-akozyrev@nvidia.com> (raw)
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")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index ad8fd13cbe..b314c0482b 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -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;
}
--
2.18.2
next reply other threads:[~2023-07-03 21:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 21:22 Alexander Kozyrev [this message]
2023-07-04 5:57 ` Slava Ovsiienko
2023-07-04 15:28 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230703212224.2370414-1-akozyrev@nvidia.com \
--to=akozyrev@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).