[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9d56ddd6-ce40-40ff-b729-48f56d0fa08d@redhat.com>
Date: Tue, 3 Sep 2024 13:34:47 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>,
Dmitry Antipov <dmantipov@...dex.ru>
Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH v3 3/3] net: sched: use RCU read-side critical section in
taprio_dump()
On 8/30/24 15:53, Alexander Lobakin wrote:
> From: Dmitry Antipov <dmantipov@...dex.ru>
> Date: Fri, 30 Aug 2024 16:48:39 +0300
>
>> On 8/30/24 4:02 PM, Alexander Lobakin wrote:
>>
>>> Why did you invert this condition and introduced +1 indent level?
>>
>> Just to reduce amount of labels and related gotos. After adding 'unlock'
>> at the end of RCU critical section, it was too much of them IMHO.
>>
>>> The original code doesn't have nla_nest_cancel(), why was it added?
>>
>> IIUC both original and new code has 'nla_nest_start_noflag()' and
>> 'nla_nest_{end,chancel}()' calls balanced correctly.
>
> Ah sorry, I haven't noticed you removed the related label below.
> That's why it's not a good idea to refactor the code in the patch
> targeted as a fix.
> You just need to fix the actual issue, not refactor anything / change
> the code flow.
+2, the fix will be small and simple without the mixed-in refactor,
which is a big plus.
Additionally goto and labels are still the preferred way to handle error
paths in networking.
Please add the target tree (net) in the prefix subj when you repost.
Thanks,
Paolo
Powered by blists - more mailing lists