Subject: Re: [PATCH net-next 5/7] net: lan966x: Add support for offloading default prio

From: Piotr Raczynski <[email-masked]>
Date: Mon, 15 May 2023 17:30:27 +0200

On Sun, May 14, 2023 at 10:10:27PM +0200, Horatiu Vultur wrote:
> Add support for offloading default prio.
> 
> Signed-off-by: Horatiu Vultur <[email-masked]>
Reviewed-by: Piotr Raczynski <[email-masked]>

...

> @@ -106,6 +111,13 @@ static int lan966x_dcb_app_validate(struct net_device *dev,
>  	int err = 0;
>  
>  	switch (app->selector) {
> +	/* Default priority checks */
> +	case IEEE_8021QAZ_APP_SEL_ETHERTYPE:
> +		if (app->protocol != 0)
nit, you can just do: if (app->protocol)

> +			err = -EINVAL;
> +		else if (app->priority >= NUM_PRIO_QUEUES)
> +			err = -ERANGE;
> +		break;

...