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: <Y5ruLxvHdlhhY+kU@nanopsycho>
Date:   Thu, 15 Dec 2022 10:51:43 +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, leon@...nel.org
Subject: Re: [RFC net-next 01/15] devlink: move code to a dedicated directory

Thu, Dec 15, 2022 at 03:01:41AM CET, kuba@...nel.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@...nel.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ