lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7fiRHoucfua+Erz@nanopsycho>
Date:   Fri, 6 Jan 2023 09:56:36 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
        pabeni@...hat.com, jacob.e.keller@...el.com
Subject: Re: [PATCH net-next 13/14] devlink: add by-instance dump infra

Thu, Jan 05, 2023 at 07:24:37PM CET, kuba@...nel.org wrote:
>On Thu, 5 Jan 2023 10:02:54 +0100 Jiri Pirko wrote:
>> Thu, Jan 05, 2023 at 04:46:04AM CET, kuba@...nel.org wrote:
>> >> What is "gen"? Generic netlink?  
>> >
>> >Generic devlink command. In other words the implementation 
>> >is straightforward enough to factor out the common parts.  
>> 
>> Could it be "genl" then?
>
>Why? What other kind of command is there?
>The distinction is weird vs generic, not genl vs IDK-what.

Compare outputs of:
git grep _gen_ net/
git grep _genl_ net/

My point is to see consistent naming scheme. I know you don't care about
that much, but I believe it helps readability and code understanding.
What is the downside? I'm not really sure why you are against it.

>
>> >> Do you plan to have more callbacks here? If no, wouldn't it be better
>> >> to just have typedef and assign the pointer to the dump_one in
>> >> devl_gen_cmds array?  
>> >
>> >If I find the time - yes, more refactoring is possible.  
>> 
>> Could you elaborate a bit more about that?
>
>If I recall I was thinking about adding a "fill" op and policy related
>info to the structure. The details would fall into place during coding..
>
>> >You mean it doesn't have nl, cmd, dump_one in the name?
>> >Could you *please* at least say what you want the names to be if you're
>> >sending all those subjective nit picks? :/  
>> 
>> Well, I provided a suggested name, not sure why that was not clear.
>> The point was s/dump/dumpit/ to match the op name.
>
>Oh, just the "it" at the end? Sorry, I don't see the point.

The point is simple. Ops is a struct of callback by name X. If someone
implements this ops struct, it is nice to assign the callbacks functions
of name y_X so it is obvious from the first sight, what the function
is related to.

I'm not sure what's wrong about having this sort of consistency. I
believe that you as a maintainer should rather enforce it than to be
against it. Am I missing something?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ