[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87zfmdkixn.fsf@nvidia.com>
Date: Tue, 5 Nov 2024 12:38:54 +0100
From: Petr Machata <petrm@...dia.com>
To: Paolo Abeni <pabeni@...hat.com>
CC: Petr Machata <petrm@...dia.com>, Jakub Kicinski <kuba@...nel.org>, "David
S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
<netdev@...r.kernel.org>, Ido Schimmel <idosch@...dia.com>, Amit Cohen
<amcohen@...dia.com>, Vladimir Oltean <vladimir.oltean@....com>, Andy Roulin
<aroulin@...dia.com>, <mlxsw@...dia.com>
Subject: Re: [PATCH net-next v2 0/8] net: Shift responsibility for FDB
notifications to drivers
Paolo Abeni <pabeni@...hat.com> writes:
> On 11/5/24 10:45, Petr Machata wrote:
>> Paolo Abeni <pabeni@...hat.com> writes:
>>> On 11/4/24 12:43, Petr Machata wrote:
>>>> Jakub Kicinski <kuba@...nel.org> writes:
>>>>> On Thu, 24 Oct 2024 18:57:35 +0200 Petr Machata wrote:
>>>>>> Besides this approach, we considered just passing a boolean back from the
>>>>>> driver, which would indicate whether the notification was done. But the
>>>>>> approach presented here seems cleaner.
>>>>>
>>>>> Oops, I missed the v2, same question:
>>>>>
>>>>> What about adding a bit to the ops struct to indicate that
>>>>> the driver will generate the notification? Seems smaller in
>>>>> terms of LoC and shifts the responsibility of doing extra
>>>>> work towards more complex users.
>>
>> How about passing an explicit bool* argument for the callee to set? I'm
>> suspicious of these one-off errno protocols. Most of the time the return
>> value is an errno, these aberrations feel easy to miss.
>
> I would be ok with that - a large arguments list should not be something
> concerning for the control path. Just to be clear: the caller init the
> bool to false, only the callees doing the notification set it, right?
Yes.
OK, I'll do it like that.
Powered by blists - more mailing lists