Subject: Re: [net-next 1/2] bonding: netlink error message support for options

From: Jakub Kicinski <[email-masked]>
Date: Tue, 7 Jun 2022 17:19:49 -0700

On Mon,  6 Jun 2022 11:26:52 -0400 Jonathan Toppins wrote:
> Add support for reporting errors via extack in both bond_newlink
> and bond_changelink.
> 
> Instead of having to look in the kernel log for why an option was not
> correct just report the error to the user via the extack variable.
> 
> What is currently reported today:
>   ip link add bond0 type bond
>   ip link set bond0 up
>   ip link set bond0 type bond mode 4
>  RTNETLINK answers: Device or resource busy
> 
> After this change:
>   ip link add bond0 type bond
>   ip link set bond0 up
>   ip link set bond0 type bond mode 4
>  Error: unable to set option because the bond is up.
> 
> Signed-off-by: Jonathan Toppins <[email-masked]>
> ---
> 
> Notes:
>     Removed the printf support and just added static messages for various
>     error events.

Thanks! nit, missing kdoc:

drivers/net/bonding/bond_options.c:729: warning: Function parameter or member 'bad_attr' not described in '__bond_opt_set'
drivers/net/bonding/bond_options.c:729: warning: Function parameter or member 'extack' not described in '__bond_opt_set'