lkml.org 
[lkml]   [2022]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [net-next v3 2/6] net: dcb: add new apptrust attribute
Date

<Daniel.Machon@microchip.com> writes:

>> > + if (ops->dcbnl_getapptrust) {
>> > + u8 selectors[IEEE_8021QAZ_APP_SEL_MAX + 1] = {0};
>> > + int nselectors;
>> > +
>> > + apptrust = nla_nest_start(skb, DCB_ATTR_DCB_APP_TRUST_TABLE);
>> > + if (!app)
>> > + return -EMSGSIZE;
>> > +
>> > + err = ops->dcbnl_getapptrust(netdev, selectors, &nselectors);
>> > + if (err)
>> > + return -EMSGSIZE;
>>
>> This should return the error coming from the driver instead of
>> -EMSGSIZE.
>
> Hmm. The question is whether we should return at all if dcbnl_getapptrust()
> fails, or just continue to fill whatever other ieee information is available?
> Seems to be like the rest of the code in ieee_fill() just ignore that error.

I see. I guess the reasoning is that one broken callback shouldn't lead
to dropping the whole query. So yeah, let's do what the rest of the code
does. But it seems rather cavalier to disregard error codes like this.

\
 
 \ /
  Last update: 2022-10-26 17:11    [W:0.054 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site