> -----Original Message-----
> From: dev <[email protected]> On Behalf Of Ciara Power
> Sent: Friday, August 7, 2020 11:59
> To: [email protected]
> Cc: [email protected]; Ciara Power <[email protected]>; Matan
> Azrad <[email protected]>; Shahaf Shuler <[email protected]>;
> Viacheslav Ovsiienko <[email protected]>
> 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 <[email protected]>
> Cc: Shahaf Shuler <[email protected]>
> Cc: Viacheslav Ovsiienko <[email protected]>
> 
> Signed-off-by: Ciara Power <[email protected]>
> ---
>  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?

Reply via email to