From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
jiri@resnulli.us, jacob.e.keller@intel.com, leon@kernel.org,
Jakub Kicinski <kuba@kernel.org>
Subject: [RFC net-next 01/15] devlink: move code to a dedicated directory
Date: Wed, 14 Dec 2022 18:01:41 -0800 [thread overview]
Message-ID: <20221215020155.1619839-2-kuba@kernel.org> (raw)
In-Reply-To: <20221215020155.1619839-1-kuba@kernel.org>
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,
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
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/
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
next prev parent reply other threads:[~2022-12-15 2:02 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 ` Jakub Kicinski [this message]
2022-12-15 9:51 ` [RFC net-next 01/15] devlink: move code to a dedicated directory Jiri Pirko
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=20221215020155.1619839-2-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).