All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, jacob.e.keller@intel.com, leon@kernel.org
Subject: Re: [RFC net-next 01/15] devlink: move code to a dedicated directory
Date: Thu, 15 Dec 2022 10:51:43 +0100	[thread overview]
Message-ID: <Y5ruLxvHdlhhY+kU@nanopsycho> (raw)
In-Reply-To: <20221215020155.1619839-2-kuba@kernel.org>

Thu, Dec 15, 2022 at 03:01:41AM CET, kuba@kernel.org wrote:
>The devlink code is hard to navigate with 13kLoC in one file.
>I really like the way Michal split the ethtool into per-command
>files and core. It'd probably be too much to split it all up,

Why not? While you are at it, I think that we should split it right
away.


>but we can at least separate the core parts out of the per-cmd
>implementations and put it in a directory so that new commands
>can be separate files.
>
>Move the code, subsequent commit will do a partial split.
>
>Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>---
> net/Makefile                            | 1 +
> net/core/Makefile                       | 1 -
> net/devlink/Makefile                    | 3 +++
> net/{core/devlink.c => devlink/basic.c} | 0

What's "basic" about it? It sounds a bit misleading.


> 4 files changed, 4 insertions(+), 1 deletion(-)
> create mode 100644 net/devlink/Makefile
> rename net/{core/devlink.c => devlink/basic.c} (100%)
>
>diff --git a/net/Makefile b/net/Makefile
>index 6a62e5b27378..0914bea9c335 100644
>--- a/net/Makefile
>+++ b/net/Makefile
>@@ -23,6 +23,7 @@ obj-$(CONFIG_BPFILTER)		+= bpfilter/
> obj-$(CONFIG_PACKET)		+= packet/
> obj-$(CONFIG_NET_KEY)		+= key/
> obj-$(CONFIG_BRIDGE)		+= bridge/
>+obj-$(CONFIG_NET_DEVLINK)	+= devlink/

Hmm, as devlink is not really designed to be only networking thing,
perhaps this is good opportunity to move out of net/ and change the
config name to "CONFIG_DEVLINK" ?


> obj-$(CONFIG_NET_DSA)		+= dsa/
> obj-$(CONFIG_ATALK)		+= appletalk/
> obj-$(CONFIG_X25)		+= x25/
>diff --git a/net/core/Makefile b/net/core/Makefile
>index 5857cec87b83..10edd66a8a37 100644
>--- a/net/core/Makefile
>+++ b/net/core/Makefile
>@@ -33,7 +33,6 @@ obj-$(CONFIG_LWTUNNEL) += lwtunnel.o
> obj-$(CONFIG_LWTUNNEL_BPF) += lwt_bpf.o
> obj-$(CONFIG_DST_CACHE) += dst_cache.o
> obj-$(CONFIG_HWBM) += hwbm.o
>-obj-$(CONFIG_NET_DEVLINK) += devlink.o
> obj-$(CONFIG_GRO_CELLS) += gro_cells.o
> obj-$(CONFIG_FAILOVER) += failover.o
> obj-$(CONFIG_NET_SOCK_MSG) += skmsg.o
>diff --git a/net/devlink/Makefile b/net/devlink/Makefile
>new file mode 100644
>index 000000000000..ba54922128ab
>--- /dev/null
>+++ b/net/devlink/Makefile
>@@ -0,0 +1,3 @@
>+# SPDX-License-Identifier: GPL-2.0
>+
>+obj-y := basic.o
>diff --git a/net/core/devlink.c b/net/devlink/basic.c
>similarity index 100%
>rename from net/core/devlink.c
>rename to net/devlink/basic.c




>-- 
>2.38.1
>

  reply	other threads:[~2022-12-15  9:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15  2:01 [RFC net-next 00/15] devlink: code split and structured instance walk Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 01/15] devlink: move code to a dedicated directory Jakub Kicinski
2022-12-15  9:51   ` Jiri Pirko [this message]
2022-12-15 18:44     ` Jacob Keller
2022-12-15 19:13       ` Jakub Kicinski
2022-12-15 19:09     ` Jakub Kicinski
2022-12-15 19:29       ` Jacob Keller
2022-12-15 19:48         ` Jakub Kicinski
2022-12-16  9:09           ` Jiri Pirko
2022-12-16  9:10       ` Jiri Pirko
2022-12-16 18:32         ` Jakub Kicinski
2022-12-16 23:26           ` Jacob Keller
2022-12-15  2:01 ` [RFC net-next 02/15] devlink: split out core code Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 03/15] devlink: split out netlink code Jakub Kicinski
2022-12-15 18:45   ` Jacob Keller
2022-12-15 19:14     ` Jakub Kicinski
2022-12-15 19:35       ` Jacob Keller
2022-12-15  2:01 ` [RFC net-next 04/15] devlink: protect devlink dump by the instance lock Jakub Kicinski
2022-12-15  8:42   ` Jiri Pirko
2022-12-15 19:17     ` Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 05/15] netlink: add macro for checking dump ctx size Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 06/15] devlink: use an explicit structure for dump context Jakub Kicinski
2022-12-15  9:52   ` Jiri Pirko
2022-12-15 18:50   ` Jacob Keller
2022-12-15 19:18     ` Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 07/15] devlink: remove start variables from dumps Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 08/15] devlink: drop the filter argument from devlinks_xa_find_get Jakub Kicinski
2022-12-15 18:52   ` Jacob Keller
2022-12-15  2:01 ` [RFC net-next 09/15] devlink: health: combine loops in dump Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 10/15] devlink: restart dump based on devlink instance ids (simple) Jakub Kicinski
2022-12-15 18:59   ` Jacob Keller
2022-12-15  2:01 ` [RFC net-next 11/15] devlink: restart dump based on devlink instance ids (nested) Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 12/15] devlink: restart dump based on devlink instance ids (function) Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 13/15] devlink: uniformly take the devlink instance lock in the dump loop Jakub Kicinski
2022-12-15  2:01 ` [RFC net-next 14/15] devlink: add by-instance dump infra Jakub Kicinski
2022-12-15  9:11   ` Jiri Pirko
2022-12-15 19:24     ` Jacob Keller
2022-12-15 19:47     ` Jakub Kicinski
2022-12-16  9:23       ` Jiri Pirko
2022-12-15 19:03   ` Jacob Keller
2022-12-15  2:01 ` [RFC net-next 15/15] devlink: convert remaining dumps to the by-instance scheme Jakub Kicinski
2022-12-15 19:39 ` [RFC net-next 00/15] devlink: code split and structured instance walk Jacob Keller

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=Y5ruLxvHdlhhY+kU@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.