lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [net-next 1/2] bonding: netlink error message support for options
From
On 6/7/22 20:19, Jakub Kicinski wrote:
> 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 <jtoppins@redhat.com>
>> ---
>>
>> 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'
>

Thanks, will post a v2 tomorrow. What tool was used to generate the
errors? sparse? checkpatch reported zero errors.

\
 
 \ /
  Last update: 2022-06-08 04:58    [W:0.050 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site