[dpdk-dev] [PATCH v2 12/17] net/mlx5: add checks for max SIMD bitwidth

Ciara Power ciara.power at intel.com
Thu Aug 27 18:12:59 CEST 2020


When choosing a vector path to take, an extra condition must be
satisfied to ensure the max SIMD bitwidth allows for the CPU enabled
path.

Cc: Matan Azrad <matan at mellanox.com>
Cc: Shahaf Shuler <shahafs at mellanox.com>
Cc: Viacheslav Ovsiienko <viacheslavo at mellanox.com>

Signed-off-by: Ciara Power <ciara.power at intel.com>

---
v2: Moved check for max bitwidth into existing check vec
    support function.
---
 drivers/net/mlx5/mlx5_rxtx_vec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index 711dcd35fa..c384c737dc 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -148,6 +148,8 @@ mlx5_check_vec_rx_support(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	uint32_t i;
 
+	if (rte_get_max_simd_bitwidth() < RTE_MAX_128_SIMD)
+		return -ENOTSUP;
 	if (!priv->config.rx_vec_en)
 		return -ENOTSUP;
 	if (mlx5_mprq_enabled(dev))
-- 
2.17.1



More information about the dev mailing list