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

From: Piotr Raczynski
Date: Mon May 15 2023 - 11:30:46 EST


On Sun, May 14, 2023 at 10:10:27PM +0200, Horatiu Vultur wrote:
> Add support for offloading default prio.
>
> Signed-off-by: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx>
Reviewed-by: Piotr Raczynski <piotr.raczynski@xxxxxxxxx>

...

> @@ -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;

...