Subject: Re: [PATCH net-next 06/11] net/mlx5e: Use extack in set ringparams callback

From: Jakub Kicinski <[email-masked]>
Date: Tue, 6 Aug 2024 18:16:56 -0700

On Tue, 6 Aug 2024 15:57:59 +0300 Tariq Toukan wrote:
>  	if (param->rx_jumbo_pending) {
> -		netdev_info(priv->netdev, "%s: rx_jumbo_pending not supported\n",
> -			    __func__);
> +		NL_SET_ERR_MSG_MOD(extack, "rx-jumbo not supported");
>  		return -EINVAL;
>  	}
>  	if (param->rx_mini_pending) {
> -		netdev_info(priv->netdev, "%s: rx_mini_pending not supported\n",
> -			    __func__);
> +		NL_SET_ERR_MSG_MOD(extack, "rx-mini not supported");
>  		return -EINVAL;
>  	}

This is dead code in the first place, mlx5 doesn't set associated max
values so:

	if (ringparam.rx_pending > max.rx_max_pending ||
	    ringparam.rx_mini_pending > max.rx_mini_max_pending ||
	    ringparam.rx_jumbo_pending > max.rx_jumbo_max_pending ||
	    ringparam.tx_pending > max.tx_max_pending)
		return -EINVAL;

in the core will reject any attempts at using these.