Skip to content

Commit

Permalink
net/mlx5: forbid MPRQ restart
Browse files Browse the repository at this point in the history
[ upstream commit f0b2d50e2c6c02555b7fbe77f909bd7f1c6ac2e4 ]

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: 161d103 ("net/mlx5: add queue start and stop")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
aleks-kozyrev authored and kevintraynor committed Jul 18, 2023
1 parent cd2b199 commit 26838c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/net/mlx5/mlx5_rxq.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,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;
}
Expand Down

0 comments on commit 26838c1

Please sign in to comment.