[dpdk-dev] [PATCH 20.11 11/12] net/mlx5: add checks for max SIMD bitwidth
Alexander Kozyrev
akozyrev at nvidia.com
Mon Aug 10 19:26:58 CEST 2020
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Ciara Power
> Sent: Friday, August 7, 2020 11:59
> To: dev at dpdk.org
> Cc: bruce.richardson at intel.com; Ciara Power <ciara.power at intel.com>; Matan
> Azrad <matan at mellanox.com>; Shahaf Shuler <shahafs at mellanox.com>;
> Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> Subject: [dpdk-dev] [PATCH 20.11 11/12] net/mlx5: add checks for max SIMD
> bitwidth
>
> 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>
> ---
> drivers/net/mlx5/mlx5_ethdev.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
> index cefb45064e..f322f82029 100644
> --- a/drivers/net/mlx5/mlx5_ethdev.c
> +++ b/drivers/net/mlx5/mlx5_ethdev.c
> @@ -479,7 +479,8 @@ mlx5_select_rx_function(struct rte_eth_dev *dev)
> eth_rx_burst_t rx_pkt_burst = mlx5_rx_burst;
>
> MLX5_ASSERT(dev != NULL);
> - if (mlx5_check_vec_rx_support(dev) > 0) {
> + if (mlx5_check_vec_rx_support(dev) > 0 &&
> + rte_get_max_simd_bitwidth() >= RTE_MAX_128_SIMD)
> {
> rx_pkt_burst = mlx5_rx_burst_vec;
> DRV_LOG(DEBUG, "port %u selected Rx vectorized function",
> dev->data->port_id);
> --
> 2.17.1
Hi Ciara, what do you think about moving this condition inside the mlx5_check_vec_rx_support() function?
More information about the dev
mailing list