[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b5f12323-1e27-358c-46cf-e4df57ac5849@intel.com>
Date: Wed, 11 Jan 2023 16:13:52 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jiri Pirko <jiri@...nulli.us>, Jakub Kicinski <kuba@...nel.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<edumazet@...gle.com>, <pabeni@...hat.com>
Subject: Re: [PATCH net-next 13/14] devlink: add by-instance dump infra
On 1/10/2023 6:31 AM, Jiri Pirko wrote:
> Mon, Jan 09, 2023 at 08:49:49PM CET, kuba@...nel.org wrote:
>> On Sat, 7 Jan 2023 10:23:48 +0100 Jiri Pirko wrote:
>>> Hmm.
>>> 1) What is wrong of having:
>>> .dumpit = devlink_instance_iter_dumpit
>>> instead of
>>> .dumpit = devlink_instance_iter_dump
>>> ?
>>> How exactly that decreases readability?
>>
>> The "it" at the end of the function name is there because do is a C
>> keyword, so we can't call the do callback do, we must call it doit.
>>
>> The further from netlink core we get the more this is an API wart
>> and the less it makes sense.
>> instance iter dump is closer to plain English.
>
> Hmm, I guess if you are not happy about the callback name, you should
> change it, to ".dump" in this case. My point the the naming consistency
> between the callback name and the function assigned. But nevermind.
+1 for having the callback part and the name match. I don't particularly
care if its .dump or .dumpit, but I do like having the callback match
the struct member. That being said, its not really a huge deal.
Thanks,
Jake
Powered by blists - more mailing lists