[PATCH 20.11] net/mlx5: fix LRO validation in Rx setup

Xueming(Steven) Li xuemingl at nvidia.com
Tue Jun 28 15:39:40 CEST 2022


Hi Michael,

The patch can't compile with the 20.11 LTS work queue. Please rebase with the below branch:

    https://github.com/steevenlee/dpdk 

Thanks,
Xueming

> -----Original Message-----
> From: Michael Baum <michaelba at nvidia.com>
> Sent: Sunday, June 26, 2022 6:44 PM
> To: stable at dpdk.org
> Cc: Matan Azrad <matan at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>; Xueming(Steven) Li <xuemingl at nvidia.com>
> Subject: [PATCH 20.11] net/mlx5: fix LRO validation in Rx setup
> 
> [ upstream commit a213b8682117711c8e92475c5bbb321a3d8428dd ]
> 
> The mlx5_rx_queue_setup() get LRO offload from user.
> 
> When LRO is configured, the LRO flag in rxq_data is set to 1.
> 
> This patch adds validation to make sure the LRO is supported.
> 
> Fixes: 17ed314 ("net/mlx5: allow LRO per Rx queue")
> 
> Signed-off-by: Michael Baum <michaelba at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
>  drivers/net/mlx5/mlx5_rxq.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 4a263a5803..6fad968eee 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -756,6 +756,14 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
>  	uint16_t n_seg = conf->rx_nseg;
>  	int res;
> 
> +	if ((offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) &&
> +	    !priv->config.lro.supported) {
> +		DRV_LOG(ERR,
> +			"Port %u queue %u LRO is configured but not supported.",
> +			dev->data->port_id, idx);
> +		rte_errno = EINVAL;
> +		return -rte_errno;
> +	}
>  	if (mp) {
>  		/*
>  		 * The parameters should be checked on rte_eth_dev layer.
> --
> 2.25.1



More information about the stable mailing list