Subject: Re: [PATCH net] devlink: Fix length of eswitch inline-mode

From: Simon Horman <[email-masked]>
Date: Mon, 11 Mar 2024 09:19:59 +0000

On Sun, Mar 10, 2024 at 06:45:47PM +0200, William Tu wrote:
> Set eswitch inline-mode to be u8, not u16. Otherwise, errors below
> 
> $ devlink dev eswitch set pci/0000:08:00.0 mode switchdev \
>   inline-mode network
>     Error: Attribute failed policy validation.
>     kernel answers: Numerical result out of rang
>     netlink: 'devlink': attribute type 26 has an invalid length.
> 
> Fixes: f2f9dd164db0 ("netlink: specs: devlink: add the remaining command to generate complete split_ops")
> Signed-off-by: William Tu <[email-masked]>
> ---
> Or we can fix the iproute2 to use u16?

My understanding is that it was u8, prior to changes moving the
code to use specs, so I think that fixing the kernel to once again use u8
is appropriate.

Reviewed-by: Simon Horman <[email-masked]>

...