[v6,7/8] app: reduce app dependencies
Checks
Commit Message
From: Bruce Richardson <bruce.richardson@intel.com>
Remove any unnecessary dependencies from the app dependency lists.
This will give each app a near-minimum set of required dependencies.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/dumpcap/meson.build | 2 +-
app/graph/meson.build | 2 +-
app/pdump/meson.build | 2 +-
app/proc-info/meson.build | 2 +-
app/test-crypto-perf/meson.build | 2 +-
app/test-fib/meson.build | 2 +-
app/test-sad/meson.build | 2 +-
app/test/meson.build | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
Comments
Hello,
Cc: Akhil.
On Tue, Feb 18, 2025 at 12:16 PM Anatoly Burakov
<anatoly.burakov@intel.com> wrote:
> diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
> index fb48d9ec29..f056431bf4 100644
> --- a/app/test-crypto-perf/meson.build
> +++ b/app/test-crypto-perf/meson.build
> @@ -19,7 +19,7 @@ sources = files(
> 'cperf_test_verify.c',
> 'main.c',
> )
> -deps += ['cryptodev', 'net', 'security']
> +deps += ['cryptodev']
> optional_deps += 'crypto_scheduler'
>
> cflags += no_wvla_cflag
- This app does seem to rely on lib/net.
[989/1266] Compiling C object
app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
FAILED: app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
ccache aarch64-linux-gnu-gcc -Iapp/dpdk-test-crypto-perf.p -Iapp
-I../app -Ilib/cryptodev -I../lib/cryptodev -Ilib/mbuf -I../lib/mbuf
-Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -I. -I..
-Iconfig -I../config -Ilib/eal/include -I../lib/eal/include
-Ilib/eal/linux/include -I../lib/eal/linux/include
-Ilib/eal/arm/include -I../lib/eal/arm/include -I../kernel/linux
-Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal
-Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics
-I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/rcu
-I../lib/rcu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64
-Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include rte_config.h
-Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral
-Wformat-security -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare
-Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned
-Wno-missing-field-initializers -D_GNU_SOURCE -mcpu=cortex-a72
-DALLOW_EXPERIMENTAL_API -Wno-vla -MD -MQ
app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -MF
app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o.d -o
app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -c
../app/test-crypto-perf/cperf_ops.c
../app/test-crypto-perf/cperf_ops.c:6:10: fatal error: rte_ether.h: No
such file or directory
6 | #include <rte_ether.h>
| ^~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
- Btw, rte_security.h is included in app/test-crypto-perf/cperf_ops.c.
However, given there is a #ifdef, I suspect the intention was to have
lib/security as an optional dep.
Hi David,
> Hello,
>
> Cc: Akhil.
>
> On Tue, Feb 18, 2025 at 12:16 PM Anatoly Burakov
> <anatoly.burakov@intel.com> wrote:
> > diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-
> perf/meson.build
> > index fb48d9ec29..f056431bf4 100644
> > --- a/app/test-crypto-perf/meson.build
> > +++ b/app/test-crypto-perf/meson.build
> > @@ -19,7 +19,7 @@ sources = files(
> > 'cperf_test_verify.c',
> > 'main.c',
> > )
> > -deps += ['cryptodev', 'net', 'security']
> > +deps += ['cryptodev']
> > optional_deps += 'crypto_scheduler'
> >
> > cflags += no_wvla_cflag
>
> - This app does seem to rely on lib/net.
>
> [989/1266] Compiling C object
> app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> FAILED: app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> ccache aarch64-linux-gnu-gcc -Iapp/dpdk-test-crypto-perf.p -Iapp
> -I../app -Ilib/cryptodev -I../lib/cryptodev -Ilib/mbuf -I../lib/mbuf
> -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -I. -I..
> -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include
> -Ilib/eal/linux/include -I../lib/eal/linux/include
> -Ilib/eal/arm/include -I../lib/eal/arm/include -I../kernel/linux
> -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal
> -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics
> -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/rcu
> -I../lib/rcu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64
> -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include rte_config.h
> -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral
> -Wformat-security -Wmissing-declarations -Wmissing-prototypes
> -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare
> -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned
> -Wno-missing-field-initializers -D_GNU_SOURCE -mcpu=cortex-a72
> -DALLOW_EXPERIMENTAL_API -Wno-vla -MD -MQ
> app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -MF
> app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o.d -o
> app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -c
> ../app/test-crypto-perf/cperf_ops.c
> ../app/test-crypto-perf/cperf_ops.c:6:10: fatal error: rte_ether.h: No
> such file or directory
> 6 | #include <rte_ether.h>
> | ^~~~~~~~~~~~~
> compilation terminated.
> ninja: build stopped: subcommand failed.
>
>
> - Btw, rte_security.h is included in app/test-crypto-perf/cperf_ops.c.
> However, given there is a #ifdef, I suspect the intention was to have
> lib/security as an optional dep.
Yes it was initially meant to be optional when rte_security was experimental.
But now, it is kind of mandatory library. I am not sure if it will compile without rte_security.
We can remove the ifdefs over rte_security and
we should not remove security dependency from crypto-perf.
-Akhil
> From: Akhil Goyal [mailto:gakhil@marvell.com]
> Sent: Wednesday, 19 February 2025 09.16
>
> Hi David,
> > Hello,
> >
> > Cc: Akhil.
> >
> > On Tue, Feb 18, 2025 at 12:16 PM Anatoly Burakov
> > <anatoly.burakov@intel.com> wrote:
> > > diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-
> > perf/meson.build
> > > index fb48d9ec29..f056431bf4 100644
> > > --- a/app/test-crypto-perf/meson.build
> > > +++ b/app/test-crypto-perf/meson.build
> > > @@ -19,7 +19,7 @@ sources = files(
> > > 'cperf_test_verify.c',
> > > 'main.c',
> > > )
> > > -deps += ['cryptodev', 'net', 'security']
> > > +deps += ['cryptodev']
> > > optional_deps += 'crypto_scheduler'
> > >
> > > cflags += no_wvla_cflag
> >
> > - This app does seem to rely on lib/net.
> >
> > [989/1266] Compiling C object
> > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> > FAILED: app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> > ccache aarch64-linux-gnu-gcc -Iapp/dpdk-test-crypto-perf.p -Iapp
> > -I../app -Ilib/cryptodev -I../lib/cryptodev -Ilib/mbuf -I../lib/mbuf
> > -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -I. -I..
> > -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include
> > -Ilib/eal/linux/include -I../lib/eal/linux/include
> > -Ilib/eal/arm/include -I../lib/eal/arm/include -I../kernel/linux
> > -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal
> > -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics
> > -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/rcu
> > -I../lib/rcu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64
> > -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include
> rte_config.h
> > -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral
> > -Wformat-security -Wmissing-declarations -Wmissing-prototypes
> > -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-
> compare
> > -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned
> > -Wno-missing-field-initializers -D_GNU_SOURCE -mcpu=cortex-a72
> > -DALLOW_EXPERIMENTAL_API -Wno-vla -MD -MQ
> > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -MF
> > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o.d -o
> > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -c
> > ../app/test-crypto-perf/cperf_ops.c
> > ../app/test-crypto-perf/cperf_ops.c:6:10: fatal error: rte_ether.h:
> No
> > such file or directory
> > 6 | #include <rte_ether.h>
> > | ^~~~~~~~~~~~~
> > compilation terminated.
> > ninja: build stopped: subcommand failed.
> >
> >
> > - Btw, rte_security.h is included in app/test-crypto-
> perf/cperf_ops.c.
> > However, given there is a #ifdef, I suspect the intention was to have
> > lib/security as an optional dep.
>
> Yes it was initially meant to be optional when rte_security was
> experimental.
> But now, it is kind of mandatory library. I am not sure if it will
> compile without rte_security.
> We can remove the ifdefs over rte_security and
> we should not remove security dependency from crypto-perf.
>
> -Akhil
Not sure what you mean here, but:
The "security" library is optional, not always enabled, when building DPDK.
Ref: /source/lib/meson.build
Not all applications use the security library (or stuff that depends on it), so don't make it mandatory!
-Morten
On Wed, Feb 19, 2025 at 11:18:46AM +0100, Morten Brørup wrote:
> > From: Akhil Goyal [mailto:gakhil@marvell.com]
> > Sent: Wednesday, 19 February 2025 09.16
> >
> > Hi David,
> > > Hello,
> > >
> > > Cc: Akhil.
> > >
> > > On Tue, Feb 18, 2025 at 12:16 PM Anatoly Burakov
> > > <anatoly.burakov@intel.com> wrote:
> > > > diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-
> > > perf/meson.build
> > > > index fb48d9ec29..f056431bf4 100644
> > > > --- a/app/test-crypto-perf/meson.build
> > > > +++ b/app/test-crypto-perf/meson.build
> > > > @@ -19,7 +19,7 @@ sources = files(
> > > > 'cperf_test_verify.c',
> > > > 'main.c',
> > > > )
> > > > -deps += ['cryptodev', 'net', 'security']
> > > > +deps += ['cryptodev']
> > > > optional_deps += 'crypto_scheduler'
> > > >
> > > > cflags += no_wvla_cflag
> > >
> > > - This app does seem to rely on lib/net.
> > >
> > > [989/1266] Compiling C object
> > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> > > FAILED: app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> > > ccache aarch64-linux-gnu-gcc -Iapp/dpdk-test-crypto-perf.p -Iapp
> > > -I../app -Ilib/cryptodev -I../lib/cryptodev -Ilib/mbuf -I../lib/mbuf
> > > -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -I. -I..
> > > -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include
> > > -Ilib/eal/linux/include -I../lib/eal/linux/include
> > > -Ilib/eal/arm/include -I../lib/eal/arm/include -I../kernel/linux
> > > -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal
> > > -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics
> > > -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/rcu
> > > -I../lib/rcu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64
> > > -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include
> > rte_config.h
> > > -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral
> > > -Wformat-security -Wmissing-declarations -Wmissing-prototypes
> > > -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-
> > compare
> > > -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned
> > > -Wno-missing-field-initializers -D_GNU_SOURCE -mcpu=cortex-a72
> > > -DALLOW_EXPERIMENTAL_API -Wno-vla -MD -MQ
> > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -MF
> > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o.d -o
> > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -c
> > > ../app/test-crypto-perf/cperf_ops.c
> > > ../app/test-crypto-perf/cperf_ops.c:6:10: fatal error: rte_ether.h:
> > No
> > > such file or directory
> > > 6 | #include <rte_ether.h>
> > > | ^~~~~~~~~~~~~
> > > compilation terminated.
> > > ninja: build stopped: subcommand failed.
> > >
> > >
> > > - Btw, rte_security.h is included in app/test-crypto-
> > perf/cperf_ops.c.
> > > However, given there is a #ifdef, I suspect the intention was to have
> > > lib/security as an optional dep.
> >
> > Yes it was initially meant to be optional when rte_security was
> > experimental.
> > But now, it is kind of mandatory library. I am not sure if it will
> > compile without rte_security.
> > We can remove the ifdefs over rte_security and
> > we should not remove security dependency from crypto-perf.
> >
> > -Akhil
>
> Not sure what you mean here, but:
> The "security" library is optional, not always enabled, when building DPDK.
> Ref: /source/lib/meson.build
>
> Not all applications use the security library (or stuff that depends on it), so don't make it mandatory!
>
I believe he's just referring to making it a mandatory dependency for this
app, not for all of DPDK. (Or so I hope). Currently it's an optional
dependency of the app.
/Bruce
> On Wed, Feb 19, 2025 at 11:18:46AM +0100, Morten Brørup wrote:
> > > From: Akhil Goyal [mailto:gakhil@marvell.com]
> > > Sent: Wednesday, 19 February 2025 09.16
> > >
> > > Hi David,
> > > > Hello,
> > > >
> > > > Cc: Akhil.
> > > >
> > > > On Tue, Feb 18, 2025 at 12:16 PM Anatoly Burakov
> > > > <anatoly.burakov@intel.com> wrote:
> > > > > diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-
> > > > perf/meson.build
> > > > > index fb48d9ec29..f056431bf4 100644
> > > > > --- a/app/test-crypto-perf/meson.build
> > > > > +++ b/app/test-crypto-perf/meson.build
> > > > > @@ -19,7 +19,7 @@ sources = files(
> > > > > 'cperf_test_verify.c',
> > > > > 'main.c',
> > > > > )
> > > > > -deps += ['cryptodev', 'net', 'security']
> > > > > +deps += ['cryptodev']
> > > > > optional_deps += 'crypto_scheduler'
> > > > >
> > > > > cflags += no_wvla_cflag
> > > >
> > > > - This app does seem to rely on lib/net.
> > > >
> > > > [989/1266] Compiling C object
> > > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> > > > FAILED: app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o
> > > > ccache aarch64-linux-gnu-gcc -Iapp/dpdk-test-crypto-perf.p -Iapp
> > > > -I../app -Ilib/cryptodev -I../lib/cryptodev -Ilib/mbuf -I../lib/mbuf
> > > > -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -I. -I..
> > > > -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include
> > > > -Ilib/eal/linux/include -I../lib/eal/linux/include
> > > > -Ilib/eal/arm/include -I../lib/eal/arm/include -I../kernel/linux
> > > > -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal
> > > > -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics
> > > > -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/rcu
> > > > -I../lib/rcu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64
> > > > -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include
> > > rte_config.h
> > > > -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral
> > > > -Wformat-security -Wmissing-declarations -Wmissing-prototypes
> > > > -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-
> > > compare
> > > > -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned
> > > > -Wno-missing-field-initializers -D_GNU_SOURCE -mcpu=cortex-a72
> > > > -DALLOW_EXPERIMENTAL_API -Wno-vla -MD -MQ
> > > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -MF
> > > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o.d -o
> > > > app/dpdk-test-crypto-perf.p/test-crypto-perf_cperf_ops.c.o -c
> > > > ../app/test-crypto-perf/cperf_ops.c
> > > > ../app/test-crypto-perf/cperf_ops.c:6:10: fatal error: rte_ether.h:
> > > No
> > > > such file or directory
> > > > 6 | #include <rte_ether.h>
> > > > | ^~~~~~~~~~~~~
> > > > compilation terminated.
> > > > ninja: build stopped: subcommand failed.
> > > >
> > > >
> > > > - Btw, rte_security.h is included in app/test-crypto-
> > > perf/cperf_ops.c.
> > > > However, given there is a #ifdef, I suspect the intention was to have
> > > > lib/security as an optional dep.
> > >
> > > Yes it was initially meant to be optional when rte_security was
> > > experimental.
> > > But now, it is kind of mandatory library. I am not sure if it will
> > > compile without rte_security.
> > > We can remove the ifdefs over rte_security and
> > > we should not remove security dependency from crypto-perf.
> > >
> > > -Akhil
> >
> > Not sure what you mean here, but:
> > The "security" library is optional, not always enabled, when building DPDK.
> > Ref: /source/lib/meson.build
> >
> > Not all applications use the security library (or stuff that depends on it), so don't
> make it mandatory!
> >
> I believe he's just referring to making it a mandatory dependency for this
> app, not for all of DPDK. (Or so I hope). Currently it's an optional
> dependency of the app.
>
I was talking about all applications which depend on rte_security.
Previously all applications which were supposed to use rte_security,
we made sure that applications also get compiled without rte_security.
(by skipping the rte_security related cases using ifdefs)
But now, that bifurcation is not maintained and
we can remove ifdefs from all applications which have rte_security dependency.
@@ -14,4 +14,4 @@ endif
ext_deps += pcap_dep
sources = files('main.c')
-deps += ['ethdev', 'pdump', 'pcapng', 'bpf']
+deps += ['pdump']
@@ -9,7 +9,7 @@ if not build
subdir_done()
endif
-deps += ['graph', 'eal', 'lpm', 'ethdev', 'node', 'cmdline', 'net']
+deps += ['node', 'cmdline']
sources = files(
'cli.c',
'conn.c',
@@ -8,6 +8,6 @@ if is_windows
endif
sources = files('main.c')
-deps += ['ethdev', 'kvargs', 'pdump']
+deps += ['pdump']
cflags += no_wvla_cflag
@@ -8,7 +8,7 @@ if is_windows
endif
sources = files('main.c')
-deps += ['ethdev', 'security', 'eventdev']
+deps += ['security', 'eventdev']
optional_deps += 'metrics'
cflags += no_wvla_cflag
@@ -19,7 +19,7 @@ sources = files(
'cperf_test_verify.c',
'main.c',
)
-deps += ['cryptodev', 'net', 'security']
+deps += ['cryptodev']
optional_deps += 'crypto_scheduler'
cflags += no_wvla_cflag
@@ -8,4 +8,4 @@ if is_windows
endif
sources = files('main.c')
-deps += ['fib', 'lpm', 'net']
+deps += ['fib', 'lpm']
@@ -8,6 +8,6 @@ if is_windows
endif
sources = files('main.c')
-deps += ['ipsec', 'net']
+deps += ['ipsec']
cflags += no_wvla_cflag
@@ -2,7 +2,7 @@
# Copyright(c) 2017-2023 Intel Corporation
# the main test files [test.c and commands.c] relies on these libraries
-deps += ['cmdline', 'ring', 'mempool', 'mbuf']
+deps += ['cmdline']
sources += files('commands.c', 'test.c')
# optional dependencies: some files may use these - and so we should link them in -