public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Moshe Shemesh <moshe@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jiri Pirko <jiri@nvidia.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 7/7] devlink: Move devlink dev selftest code to dev
Date: Fri, 3 Feb 2023 09:02:53 +0100	[thread overview]
Message-ID: <Y9y/rfqIZg3oaBnq@nanopsycho> (raw)
In-Reply-To: <20230202114621.3f32dae1@kernel.org>

Thu, Feb 02, 2023 at 08:46:21PM CET, kuba@kernel.org wrote:
>On Thu, 2 Feb 2023 21:33:52 +0200 Moshe Shemesh wrote:
>> On 02/02/2023 20:17, Jakub Kicinski wrote:
>> > On Thu, 2 Feb 2023 16:47:06 +0200 Moshe Shemesh wrote:  
>> >> Move devlink dev selftest callbacks and related code from leftover.c to
>> >> file dev.c. No functional change in this patch.  
>> > selftest I'd put in its own file. We don't want every command which
>> > doesn't have a specific sub-object to end up in dev.c, right?
>> > At least that was my initial thinking. I don't see any dependencies
>> > between the selftest code and the rest of the dev code either.
>> > WDYT?  
>> 
>> I thought as it is devlink dev selftest, the sub-object is dev. 
>> Otherwise, what should be the rule here ?
>> 
>> How do we decide if it should get its own file ?
>
>My thinking was that it should be much easier for newcomers to grok
>"what does it take to implement a devlink command" if most of the
>subcommands where in their own files, like in ethtool.
>
>The implementation could have as well made selftest a subobject.
>But I don't feel strongly, if noone agrees we can apply as is and 
>see if dev.c does indeed start to grow out of proportion.

I think that per-object separation is good for now. I see no point of
having per-cmd files of sometimes 50 lines. IDK. No strong opinion.
I would start with per-object.


  reply	other threads:[~2023-02-03  8:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 14:46 [PATCH net-next 0/7] devlink: Move devlink dev code to a separate file Moshe Shemesh
2023-02-02 14:47 ` [PATCH net-next 1/7] devlink: Split out dev get and dump code Moshe Shemesh
2023-02-02 14:47 ` [PATCH net-next 2/7] devlink: Move devlink dev reload code to dev Moshe Shemesh
2023-02-02 14:47 ` [PATCH net-next 3/7] devlink: Move devlink dev eswitch " Moshe Shemesh
2023-02-02 14:47 ` [PATCH net-next 4/7] devlink: Move devlink dev info " Moshe Shemesh
2023-02-02 14:47 ` [PATCH net-next 5/7] devlink: Move devlink dev flash " Moshe Shemesh
2023-02-02 14:47 ` [PATCH net-next 6/7] devlink: Move devlink_info_req struct to be local Moshe Shemesh
2023-02-02 14:47 ` [PATCH net-next 7/7] devlink: Move devlink dev selftest code to dev Moshe Shemesh
2023-02-02 18:17   ` Jakub Kicinski
2023-02-02 19:33     ` Moshe Shemesh
2023-02-02 19:46       ` Jakub Kicinski
2023-02-03  8:02         ` Jiri Pirko [this message]
2023-02-02 15:44 ` [PATCH net-next 0/7] devlink: Move devlink dev code to a separate file Jiri Pirko
2023-02-04  3:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9y/rfqIZg3oaBnq@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox