Examples compilation fixes
cover Examples compilation fixes
I stepped right into Bruce trap [1] and tested all possible examples. The result is this series.
1: https://patchwork.dpdk.org/patch/82361/
Signature · 59 lines
David Marchand David Marchand (10): examples/fips_validation: fix build with pkg-config examples/ipsec-gw: fix build with pkg-config examples/kni: fix build with pkg-config examples/l2fwd-crypto: fix build with pkg-config examples/l3fwd-graph: fix static build examples/ntb: fix clean target examples/vhost_blk: fix build with pkg-config examples/rxtx_callbacks: fix build with pkg-config devtools: compile all examples with pkg-config examples: restore trace point devtools/test-meson-builds.sh | 28 ++++++++++++++++++- examples/cmdline/Makefile | 2 ++ examples/distributor/Makefile | 2 ++ examples/ethtool/ethtool-app/Makefile | 2 ++ examples/fips_validation/Makefile | 2 ++ examples/flow_filtering/Makefile | 2 ++ examples/helloworld/Makefile | 2 ++ examples/ioat/Makefile | 2 ++ examples/ip_reassembly/Makefile | 2 ++ examples/ipsec-secgw/Makefile | 1 + examples/ipv4_multicast/Makefile | 2 ++ examples/kni/Makefile | 1 + examples/l2fwd-cat/Makefile | 2 ++ examples/l2fwd-crypto/Makefile | 6 ++++ examples/l2fwd-event/Makefile | 2 ++ examples/l2fwd-jobstats/Makefile | 2 ++ examples/l2fwd-keepalive/Makefile | 2 ++ examples/l2fwd-keepalive/ka-agent/Makefile | 2 ++ examples/l3fwd-acl/Makefile | 2 ++ examples/l3fwd-graph/Makefile | 2 +- examples/link_status_interrupt/Makefile | 2 ++ .../client_server_mp/mp_client/Makefile | 2 ++ .../client_server_mp/mp_server/Makefile | 2 ++ examples/multi_process/hotplug_mp/Makefile | 2 ++ examples/multi_process/simple_mp/Makefile | 2 ++ examples/multi_process/symmetric_mp/Makefile | 2 ++ examples/ntb/Makefile | 2 +- examples/packet_ordering/Makefile | 2 ++ examples/ptpclient/Makefile | 2 ++ examples/qos_sched/Makefile | 2 ++ examples/rxtx_callbacks/Makefile | 2 ++ examples/server_node_efd/node/Makefile | 2 ++ examples/server_node_efd/server/Makefile | 2 ++ examples/service_cores/Makefile | 2 ++ examples/skeleton/Makefile | 2 ++ examples/timer/Makefile | 2 ++ examples/vhost_blk/vhost_blk.c | 6 ++++ examples/vm_power_manager/Makefile | 2 ++ examples/vm_power_manager/guest_cli/Makefile | 2 ++ examples/vmdq/Makefile | 2 ++ examples/vmdq_dcb/Makefile | 2 ++ 41 files changed, 111 insertions(+), 3 deletions(-) -- 2.23.0
PATCH 1/10 examples/fips_validation: fix build with pkg-config
When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated.
--- examples/fips_validation/Makefile | 2 ++ 1 file changed, 2 insertions(+)
examples/fips_validation/Makefile +2 -0
@@ -36,6 +36,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH 2/10 examples/ipsec-gw: fix build with pkg-config
In reply to David Marchandflow.c: In function ‘parse_flow_tokens’:
flow.c:153:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
153 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:154:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
154 | &rule->ipv4.mask.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~flow.c:170:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
170 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:171:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
171 | &rule->ipv4.mask.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Meson build is fine since we waive those warnings. Replicate it for make.
--- examples/ipsec-secgw/Makefile | 1 + 1 file changed, 1 insertion(+)
examples/ipsec-secgw/Makefile +1 -0
@@ -42,6 +42,7 @@ LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -Wno-address-of-packed-member build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH 3/10 examples/kni: fix build with pkg-config
In reply to David Marchandrm -f build/kni build/kni-static build/kni-shared test -d build && rmdir -p build || true
[...]/usr/bin/ld: /tmp/cc72ssnK.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
This example explicitly call pthread API and should be linked against the pthread library.
--- examples/kni/Makefile | 1 + 1 file changed, 1 insertion(+)
examples/kni/Makefile +1 -0
@@ -24,6 +24,7 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +LDFLAGS += -pthread LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
Signature · 1 line
2.23.0
PATCH 4/10 examples/l2fwd-crypto: fix build with pkg-config
In reply to David MarchandTwo issues fixed here.
First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status
--- examples/l2fwd-crypto/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/Makefile +6 -0
@@ -24,8 +24,14 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1) +ifeq ($(NEED_CRYPTO_SCHEDULER), 1) +LDFLAGS_SHARED += -lrte_crypto_scheduler +endif LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH 5/10 examples/l3fwd-graph: fix static build
In reply to David MarchandThis example missed the rework from commit 8549295db07b ("build/pkg-config: improve static linking flags").
--- examples/l3fwd-graph/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd-graph/Makefile +1 -1
@@ -24,7 +24,7 @@ PKGCONF=pkg-config --define-prefix PC_FILE := $(shell $(PKGCONF) --path libdpdk) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) +LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH 6/10 examples/ntb: fix clean target
In reply to David MarchandWhen introducing this example, the cleanup from commit 7e9562a107f1 ("examples: fix make clean when using pkg-config") was missed.
--- examples/ntb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/Makefile +1 -1
@@ -42,4 +42,4 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH 06/10] examples/ntb: fix clean target
Quoted 33 lines
-----Original Message-----
From: David Marchand <[email protected]>
Sent: Tuesday, November 10, 2020 23:12
To: [email protected]
Cc: [email protected]; Richardson, Bruce <[email protected]>; [email protected]; Li, Xiaoyun <[email protected]>; Wu, Jingjing <[email protected]>; Xiaolong Ye <[email protected]>
Subject: [PATCH 06/10] examples/ntb: fix clean targetWhen introducing this example, the cleanup from commit
7e9562a107f1("examples: fix make clean when using pkg-config") was missed.Fixes c5eebf85badc ("examples/ntb: add example for NTB")Signed-off-by David Marchand <[email protected]>--- examples/ntb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/ntb/Makefile index renamed from examples/ntb/Makefile +0
-0
4675570fd2..d35dabc471100644examples/ntb/Makefile +1
-2@@ -42,4 +42,4 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true --
Quoted 1 line
2.23.0
Thanks for the catch.
PATCH 7/10 examples/vhost_blk: fix build with pkg-config
In reply to David Marchandvhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]
543 | CPU_ZERO(&cpuset);
| ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
544 | CPU_SET(0, &cpuset);
| ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
545 | pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
| ^~~~~~~~~~~~~~~~~~~~~~/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference to CPU_ZERO' /usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference to CPU_SET'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1
Explicitly pass _GNU_SOURCE and include missing headers (rather than rely on automagic inclusion from other system headers).
--- examples/vhost_blk/vhost_blk.c | 6 ++++++ 1 file changed, 6 insertions(+)
examples/vhost_blk/vhost_blk.c +6 -0
@@ -2,6 +2,12 @@* Copyright(c) 2010-2019 Intel Corporation */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include <pthread.h> +#include <sched.h> +#include <stdint.h> #include <unistd.h> #include <stdbool.h>
Signature · 1 line
2.23.0
PATCH 8/10 examples/rxtx_callbacks: fix build with pkg-config
In reply to David MarchandThis example is missing the experimental flag since it uses an experimental API.
--- examples/rxtx_callbacks/Makefile | 2 ++ 1 file changed, 2 insertions(+)
examples/rxtx_callbacks/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH 9/10 devtools: compile all examples with pkg-config
In reply to David MarchandCompiling examples out of meson must be tested so that those examples Makefile work.
This is based on Bruce patch [1], waiting for it (or an equivalent) to be merged.
1: https://patchwork.dpdk.org/patch/82361/
--- devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +27 -1
@@ -268,7 +268,33 @@ export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH # if pkg-config defines the necessary flags, test building some examples if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then export PKGCONF="pkg-config --define-prefix" - for example in cmdline helloworld l2fwd l3fwd skeleton timer; do + export LD_LIBRARY_PATH=$(dirname $(find $DESTDIR -name librte_eal.so)):$LD_LIBRARY_PATH + examples_to_test=${DPDK_BUILD_TEST_EXAMPLES:-} + if [ -z "$examples_to_test" ]; then + ################## + # FIXME examples # + ################## + skipped="" + # Relies on librte_power internal header + skipped="$skipped guest_cli vm_power_manager" + # Expects libqos + skipped="$skipped l2fwd-cat" + # performance-thread/{l3fwd-thread,pthread_shim} expect common .mk + skipped="$skipped l3fwd-thread pthread_shim" + # client_server_mp/{mp_server,mp_client} expect common headers + skipped="$skipped mp_client mp_server" + # server_node_efd/{node,server} expect common headers + skipped="$skipped node server" + # waiting for fixes + skipped="$skipped vhost" + for mk in $DESTDIR/usr/local/share/dpdk/examples/*/Makefile; do + name=$(basename $(dirname $mk)) + [ "$skipped" = "${skipped/ $name}" ] || + continue + examples_to_test="$examples_to_test $name" + done + fi + for example in $examples_to_test; do echo "## Building $example" $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean shared static done
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH 09/10] devtools: compile all examples with pkg-config
Quoted 26 lines · David Marchand
Compiling examples out of meson must be tested so that those examples
Makefilework.
This is based on Bruce patch [1], waiting for it (or an equivalent) to be merged.1: https://patchwork.dpdk.org/patch/82361/
Signed-off-by David Marchand <[email protected]>--- devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)devtools/test-meson-builds.sh +5
-1@@ -268,7 +268,33 @@ export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH # if pkg-config defines the necessary flags, test building some examples if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then export PKGCONF="pkg-config --define-prefix" - for example in cmdline helloworld l2fwd l3fwd skeleton timer; do + export LD_LIBRARY_PATH=$(dirname $(find $DESTDIR -name librte_eal.so)):$LD_LIBRARY_PATH + examples_to_test=${DPDK_BUILD_TEST_EXAMPLES:-} + if [ -z "$examples_to_test" ]; then + ################## + # FIXME examples #
devtools/test-meson-builds.sh export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH · line 285
Quoted 10 lines
devtools/test-meson-builds.sh +10
-0+ ################## + skipped="" + # Relies on librte_power internal header + skipped="$skipped guest_cli vm_power_manager" + # Expects libqos + skipped="$skipped l2fwd-cat" + # performance-thread/{l3fwd-thread,pthread_shim} expect common .mk + skipped="$skipped l3fwd-thread pthread_shim" + # client_server_mp/{mp_server,mp_client} expect common headers + skipped="$skipped mp_client mp_server"
I was initially confused by this, because they build fine for me. However, I realised I was running the build from within the examples source folder, rather than as installed in the install folder. The examples directory seems more flattened there, which is the cause of the problems. I will investigate.
/Bruce
Re: [dpdk-dev] [PATCH 09/10] devtools: compile all examples with pkg-config
In reply to David MarchandQuoted 28 lines · David Marchand
Compiling examples out of meson must be tested so that those examples
Makefilework.
This is based on Bruce patch [1], waiting for it (or an equivalent) to be merged.1: https://patchwork.dpdk.org/patch/82361/
Signed-off-by David Marchand <[email protected]>--- devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)devtools/test-meson-builds.sh +7
-1@@ -268,7 +268,33 @@ export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH # if pkg-config defines the necessary flags, test building some examples if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then export PKGCONF="pkg-config --define-prefix" - for example in cmdline helloworld l2fwd l3fwd skeleton timer; do + export LD_LIBRARY_PATH=$(dirname $(find $DESTDIR -name librte_eal.so)):$LD_LIBRARY_PATH + examples_to_test=${DPDK_BUILD_TEST_EXAMPLES:-} + if [ -z "$examples_to_test" ]; then + ################## + # FIXME examples # + ################## + skipped=""
devtools/test-meson-builds.sh export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH · line 287
Quoted 10 lines
devtools/test-meson-builds.sh +10
-0+ # Relies on librte_power internal header + skipped="$skipped guest_cli vm_power_manager" + # Expects libqos + skipped="$skipped l2fwd-cat" + # performance-thread/{l3fwd-thread,pthread_shim} expect common .mk + skipped="$skipped l3fwd-thread pthread_shim" + # client_server_mp/{mp_server,mp_client} expect common headers + skipped="$skipped mp_client mp_server" + # server_node_efd/{node,server} expect common headers + skipped="$skipped node server"
The issues with the missing common files for all of above should be fixed by patch [1]
/Bruce
Re: [dpdk-dev] [PATCH 09/10] devtools: compile all examples with pkg-config
Quoted 9 lines · Bruce Richardson
devtools/test-meson-builds.sh export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH · line 287
Quoted 6 lines
devtools/test-meson-builds.sh +6
-0+ # performance-thread/{l3fwd-thread,pthread_shim} expect common .mk + skipped="$skipped l3fwd-thread pthread_shim" + # client_server_mp/{mp_server,mp_client} expect common headers + skipped="$skipped mp_client mp_server" + # server_node_efd/{node,server} expect common headers + skipped="$skipped node server"The issues with the missing common files for all of above should be fixed by patch [1]
I was about to look at this flattening stuff. Thanks for fixing while I was out for the kids :-).
I'll respin once both your patches are in.
Signature · 1 line
David Marchand
PATCH 10/10 examples: restore trace point
In reply to David MarchandBefore make removal, those examples were built with experimental flag for tracepoints to be compiled in but the pkg-config part of those makefiles were missed.
--- examples/cmdline/Makefile | 2 ++ examples/distributor/Makefile | 2 ++ examples/ethtool/ethtool-app/Makefile | 2 ++ examples/flow_filtering/Makefile | 2 ++ examples/helloworld/Makefile | 2 ++ examples/ioat/Makefile | 2 ++ examples/ip_reassembly/Makefile | 2 ++ examples/ipv4_multicast/Makefile | 2 ++ examples/l2fwd-cat/Makefile | 2 ++ examples/l2fwd-event/Makefile | 2 ++ examples/l2fwd-jobstats/Makefile | 2 ++ examples/l2fwd-keepalive/Makefile | 2 ++ examples/l2fwd-keepalive/ka-agent/Makefile | 2 ++ examples/l3fwd-acl/Makefile | 2 ++ examples/link_status_interrupt/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++ examples/multi_process/hotplug_mp/Makefile | 2 ++ examples/multi_process/simple_mp/Makefile | 2 ++ examples/multi_process/symmetric_mp/Makefile | 2 ++ examples/packet_ordering/Makefile | 2 ++ examples/ptpclient/Makefile | 2 ++ examples/qos_sched/Makefile | 2 ++ examples/server_node_efd/node/Makefile | 2 ++ examples/server_node_efd/server/Makefile | 2 ++ examples/service_cores/Makefile | 2 ++ examples/skeleton/Makefile | 2 ++ examples/timer/Makefile | 2 ++ examples/vm_power_manager/Makefile | 2 ++ examples/vm_power_manager/guest_cli/Makefile | 2 ++ examples/vmdq/Makefile | 2 ++ examples/vmdq_dcb/Makefile | 2 ++ 32 files changed, 64 insertions(+)
examples/cmdline/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/distributor/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ethtool/ethtool-app/Makefile +2 -0
@@ -31,6 +31,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC += $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/flow_filtering/Makefile +2 -0
@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/helloworld/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ioat/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_reassembly/Makefile +2 -0
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ipv4_multicast/Makefile +2 -0
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-cat/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + LDFLAGS += -lpqos build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
examples/l2fwd-event/Makefile +2 -0
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-jobstats/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/ka-agent/Makefile +2 -0
@@ -30,6 +30,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-acl/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/link_status_interrupt/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/client_server_mp/mp_client/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/client_server_mp/mp_server/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/hotplug_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/simple_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/symmetric_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/packet_ordering/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ptpclient/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/qos_sched/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/server_node_efd/node/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/server_node_efd/server/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/service_cores/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/skeleton/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/timer/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vm_power_manager/Makefile +2 -0
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + ifneq ($(shell $(PKGCONF) --atleast-version=0.9.3 libvirt; echo $$?), 0) $(error vm_power_manager requires libvirt >= 0.9.3) endif
examples/vm_power_manager/guest_cli/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq_dcb/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
Quoted 20 lines · David Marchand
I stepped right into Bruce trap [1] and tested all possible examples. The result is this series.
1: https://patchwork.dpdk.org/patch/82361/
Signature · 13 lines
David Marchand David Marchand (10): examples/fips_validation: fix build with pkg-config examples/ipsec-gw: fix build with pkg-config examples/kni: fix build with pkg-config examples/l2fwd-crypto: fix build with pkg-config examples/l3fwd-graph: fix static build examples/ntb: fix clean target examples/vhost_blk: fix build with pkg-config examples/rxtx_callbacks: fix build with pkg-config devtools: compile all examples with pkg-config examples: restore trace point
Thanks for the work David, this is great. I'll see about doing more cleanup on the skipped list, particularly how we install the examples in the "share" folder, but until then this is great progress.
Series-acked-by: Bruce Richardson <bruce.richardson>
v2 cover Examples compilation fixes
In reply to David MarchandI tested external compilation for all possible examples (in my env). The result is this series.
Signature · 69 lines
David Marchand Changelog since v1: - added patch 7 to fix performance-thread example, - reworked last patch by introducing a new -Dexamples=buildall special value and removed exceptions for examples recently fixed in main thanks to Bruce, David Marchand (11): examples/fips_validation: fix build with pkg-config examples/ipsec-gw: fix build with pkg-config examples/kni: fix build with pkg-config examples/l2fwd-crypto: fix build with pkg-config examples/l3fwd-graph: fix static build examples/ntb: fix clean target examples/performance-thread: fix build with pkg-config examples/vhost_blk: fix build with pkg-config examples/rxtx_callbacks: fix build with pkg-config examples: restore trace point devtools: compile all buildable examples with pkg-config devtools/test-meson-builds.sh | 11 +++++++-- examples/cmdline/Makefile | 2 ++ examples/distributor/Makefile | 2 ++ examples/ethtool/ethtool-app/Makefile | 2 ++ examples/fips_validation/Makefile | 2 ++ examples/flow_filtering/Makefile | 2 ++ examples/helloworld/Makefile | 2 ++ examples/ioat/Makefile | 2 ++ examples/ip_reassembly/Makefile | 2 ++ examples/ipsec-secgw/Makefile | 1 + examples/ipv4_multicast/Makefile | 2 ++ examples/kni/Makefile | 1 + examples/l2fwd-cat/Makefile | 2 ++ examples/l2fwd-crypto/Makefile | 6 +++++ examples/l2fwd-event/Makefile | 2 ++ examples/l2fwd-jobstats/Makefile | 2 ++ examples/l2fwd-keepalive/Makefile | 2 ++ examples/l2fwd-keepalive/ka-agent/Makefile | 2 ++ examples/l3fwd-acl/Makefile | 2 ++ examples/l3fwd-graph/Makefile | 2 +- examples/link_status_interrupt/Makefile | 2 ++ examples/meson.build | 24 +++++++++++++++++-- .../client_server_mp/mp_client/Makefile | 2 ++ .../client_server_mp/mp_server/Makefile | 2 ++ examples/multi_process/hotplug_mp/Makefile | 2 ++ examples/multi_process/simple_mp/Makefile | 2 ++ examples/multi_process/symmetric_mp/Makefile | 2 ++ examples/ntb/Makefile | 2 +- examples/packet_ordering/Makefile | 2 ++ .../performance-thread/l3fwd-thread/main.c | 5 ++++ examples/ptpclient/Makefile | 2 ++ examples/qos_sched/Makefile | 2 ++ examples/rxtx_callbacks/Makefile | 2 ++ examples/server_node_efd/node/Makefile | 2 ++ examples/server_node_efd/server/Makefile | 2 ++ examples/service_cores/Makefile | 2 ++ examples/skeleton/Makefile | 2 ++ examples/timer/Makefile | 2 ++ examples/vhost_blk/vhost_blk.c | 6 +++++ examples/vm_power_manager/Makefile | 2 ++ examples/vm_power_manager/guest_cli/Makefile | 2 ++ examples/vmdq/Makefile | 2 ++ examples/vmdq_dcb/Makefile | 2 ++ meson.build | 2 ++ 44 files changed, 122 insertions(+), 6 deletions(-) -- 2.23.0
PATCH v2 1/11 examples/fips_validation: fix build with pkg-config
When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated.
--- examples/fips_validation/Makefile | 2 ++ 1 file changed, 2 insertions(+)
examples/fips_validation/Makefile +2 -0
@@ -36,6 +36,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v2 2/11 examples/ipsec-gw: fix build with pkg-config
In reply to David Marchandflow.c: In function ‘parse_flow_tokens’:
flow.c:153:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
153 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:154:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
154 | &rule->ipv4.mask.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~flow.c:170:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
170 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:171:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
171 | &rule->ipv4.mask.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Meson build is fine since we waive those warnings. Replicate it for make.
--- examples/ipsec-secgw/Makefile | 1 + 1 file changed, 1 insertion(+)
examples/ipsec-secgw/Makefile +1 -0
@@ -42,6 +42,7 @@ LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -Wno-address-of-packed-member build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
Re: [dpdk-dev] [EXT] [PATCH v2 02/11] examples/ipsec-gw: fix build with pkg-config
Quoted 26 lines
flow.c: In function ‘parse_flow_tokens’:
flow.c:153:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of- packed-member]
153 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.src_addr,| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flow.c:154:9: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed- member] 154 | &rule->ipv4.mask.hdr.src_addr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~flow.c:170:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of- packed-member]
170 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.dst_addr,| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flow.c:171:9: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed- member] 171 | &rule->ipv4.mask.hdr.dst_addr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Meson build is fine since we waive those warnings. Replicate it for make.
Quoted 6 lines
Fixes 8e693616fcb2 ("examples/ipsec-secgw: enable flow baseddistribution")
Cc: [email protected]Signed-off-by David Marchand <[email protected]>Acked-by Bruce Richardson <[email protected]>
PATCH v2 3/11 examples/kni: fix build with pkg-config
In reply to David Marchandrm -f build/kni build/kni-static build/kni-shared test -d build && rmdir -p build || true
[...]/usr/bin/ld: /tmp/cc72ssnK.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
This example explicitly call pthread API and should be linked against the pthread library.
--- examples/kni/Makefile | 1 + 1 file changed, 1 insertion(+)
examples/kni/Makefile +1 -0
@@ -24,6 +24,7 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +LDFLAGS += -pthread LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
Signature · 1 line
2.23.0
PATCH v2 4/11 examples/l2fwd-crypto: fix build with pkg-config
In reply to David MarchandTwo issues fixed here.
First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status
--- examples/l2fwd-crypto/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/Makefile +6 -0
@@ -24,8 +24,14 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1) +ifeq ($(NEED_CRYPTO_SCHEDULER), 1) +LDFLAGS_SHARED += -lrte_crypto_scheduler +endif LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config
Quoted 23 lines · David Marchand
Two issues fixed here.
First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:/usr/bin/ld:/tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit statusFixes e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")Fixes 261bbff75e34 ("examples: use separate crypto session mempools")Signed-off-by David Marchand <[email protected]>Acked-by Bruce Richardson <[email protected]>--- examples/l2fwd-crypto/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)examples/l2fwd-crypto/Makefile +0
-0
examples/l2fwd-crypto/Makefile PKGCONF ?= pkg-config · line 28
Quoted 5 lines
examples/l2fwd-crypto/Makefile +2
-0@@ -24,8 +24,14 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1) +ifeq ($(NEED_CRYPTO_SCHEDULER), 1)
Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:
CONFIG_DEFINES=$(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)
Then we can easily do multiple checks for vars as needed using findstring, e.g.
ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
endif
Whatever approach we use here, I'd like applicable across all makefiles for consistency, and shelling out per-value seems wasteful. Pulling all macro values also allows checks for architecture and instruction set levels too, if so desired.
/Bruce
Quoted 12 lines
examples/l2fwd-crypto/Makefile +4
-0+LDFLAGS_SHARED += -lrte_crypto_scheduler +endif LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config
Quoted 17 lines · Bruce Richardson
examples/l2fwd-crypto/Makefile PKGCONF ?= pkg-config · line 28
Quoted 2 lines
examples/l2fwd-crypto/Makefile +2
-0+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1) +ifeq ($(NEED_CRYPTO_SCHEDULER), 1)Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:
CONFIG_DEFINES=$(shell$(CC) $(CFLAGS) -dM -E - </dev/null)Then we can easily do multiple checks for vars as needed using findstring, e.g.
ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
endif
Quoted 4 lines
Whatever approach we use here, I'd like applicable across all makefiles for consistency, and shelling out per-value seems wasteful. Pulling all macro values also allows checks for architecture and instruction set levels too, if so desired.
I'll have a try..
Signature · 1 line
David Marchand
Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config
Quoted 20 lines · David Marchand
Quoted 17 lines · Bruce Richardson
Review
Quoted 2 lines
(quoted diff) +2
-0+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1) +ifeq ($(NEED_CRYPTO_SCHEDULER), 1)Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:
CONFIG_DEFINES=$(shell$(CC) $(CFLAGS) -dM -E - </dev/null)Then we can easily do multiple checks for vars as needed using findstring, e.g.
ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
endif
Quoted 4 lines
Quoted 4 lines
Whatever approach we use here, I'd like applicable across all makefiles for consistency, and shelling out per-value seems wasteful. Pulling all macro values also allows checks for architecture and instruction set levels too, if so desired.
examples/l2fwd-crypto/Makefile +6 -0
@@ -23,9 +23,15 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),) +LDFLAGS_SHARED += -lrte_crypto_scheduler +endif LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
I'll send a v3 later.
Signature · 1 line
David Marchand
Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config
Quoted 30 lines · David Marchand
Quoted 24 lines · David Marchand
Quoted 21 lines · Bruce Richardson
Review
Quoted 2 lines
(quoted diff) +2
-0+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1) +ifeq ($(NEED_CRYPTO_SCHEDULER), 1)Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:
CONFIG_DEFINES=$(shell$(CC) $(CFLAGS) -dM -E - </dev/null)Then we can easily do multiple checks for vars as needed using findstring, e.g.
ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
endifWhatever approach we use here, I'd like applicable across all makefiles for consistency, and shelling out per-value seems wasteful. Pulling all macro values also allows checks for architecture and instruction set levels too, if so desired.
examples/l2fwd-crypto/Makefile PKGCONF ?= pkg-config · line 32
Quoted 10 lines
examples/l2fwd-crypto/Makefile +4
-0@@ -23,9 +23,15 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),) +LDFLAGS_SHARED += -lrte_crypto_scheduler +endif LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
Can we perhaps keep the existing pkg-config query lines together in the existing block, and just add the extra checks for this particular app afterwards? Having done changes en-mass to the example makefiles a couple of times, it was made a lot easier by having the exact same lines in each as much as possible, allowing changes to be made by applying a single patch-file to each makefile in turn.
PATCH v2 5/11 examples/l3fwd-graph: fix static build
In reply to David MarchandThis example missed the rework from commit 8549295db07b ("build/pkg-config: improve static linking flags").
--- examples/l3fwd-graph/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd-graph/Makefile +1 -1
@@ -24,7 +24,7 @@ PKGCONF=pkg-config --define-prefix PC_FILE := $(shell $(PKGCONF) --path libdpdk) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) +LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v2 6/11 examples/ntb: fix clean target
In reply to David MarchandWhen introducing this example, the cleanup from commit 7e9562a107f1 ("examples: fix make clean when using pkg-config") was missed.
--- examples/ntb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/Makefile +1 -1
@@ -42,4 +42,4 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true
Signature · 1 line
2.23.0
PATCH v2 7/11 examples/performance-thread: fix build with pkg-config
In reply to David Marchandmain.c: In function ‘lthread_tx’:
main.c:2091:25: error: implicit declaration of function ‘sched_getcpu’;
did you mean ‘sched_getparam’? [-Werror=implicit-function-declaration]
2091 | tx_conf->conf.cpu_id = sched_getcpu();
| ^~~~~~~~~~~~
| sched_getparamcc1: all warnings being treated as errors
Explicitly pass _GNU_SOURCE and include missing header (rather than rely on automagic inclusion from other system headers).
--- examples/performance-thread/l3fwd-thread/main.c | 5 +++++ 1 file changed, 5 insertions(+)
examples/performance-thread/l3fwd-thread/main.c +5 -0
@@ -2,6 +2,10 @@* Copyright(c) 2010-2016 Intel Corporation */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include <stdio.h> #include <stdlib.h> #include <stdint.h>
@@ -12,6 +16,7 @@#include <stdarg.h> #include <errno.h> #include <getopt.h> +#include <sched.h> #include <rte_common.h> #include <rte_vect.h>
Signature · 1 line
2.23.0
PATCH v2 8/11 examples/vhost_blk: fix build with pkg-config
In reply to David Marchandvhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]
543 | CPU_ZERO(&cpuset);
| ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
544 | CPU_SET(0, &cpuset);
| ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
545 | pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
| ^~~~~~~~~~~~~~~~~~~~~~/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference to CPU_ZERO' /usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference to CPU_SET'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1
Explicitly pass _GNU_SOURCE and include missing headers (rather than rely on automagic inclusion from other system headers).
--- examples/vhost_blk/vhost_blk.c | 6 ++++++ 1 file changed, 6 insertions(+)
examples/vhost_blk/vhost_blk.c +6 -0
@@ -2,6 +2,12 @@* Copyright(c) 2010-2019 Intel Corporation */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include <pthread.h> +#include <sched.h> +#include <stdint.h> #include <unistd.h> #include <stdbool.h>
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH v2 08/11] examples/vhost_blk: fix build with pkg-config
Quoted 39 lines · David Marchand
vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]543 | CPU_ZERO(&cpuset); | ^~~~~~~~ vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’ [-Wimplicit-function-declaration] 544 | CPU_SET(0, &cpuset); | ^~~~~~~ vhost_blk.c:545:2: warning: implicit declaration of function ‘pthread_setaffinity_np’ [-Wimplicit-function-declaration] 545 | pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset); | ^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld:/tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference toCPU_ZERO' /usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference toCPU_SET'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1Explicitly pass
_GNU_SOURCEand include missing headers (rather than rely on automagic inclusion from other system headers).Fixes c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")Signed-off-by David Marchand <[email protected]>Acked-by Bruce Richardson <[email protected]>--- examples/vhost_blk/vhost_blk.c | 6 ++++++ 1 file changed, 6 insertions(+)examples/vhost_blk/vhost_blk.c +0
-0@@ -2,6 +2,12 @@* Copyright(c) 2010-2019 Intel Corporation */
examples/vhost_blk/vhost_blk.c line 13
Quoted 10 lines
examples/vhost_blk/vhost_blk.c +6
-0+#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include <pthread.h> +#include <sched.h> +#include <stdint.h> #include <unistd.h> #include <stdbool.h>
PATCH v2 9/11 examples/rxtx_callbacks: fix build with pkg-config
In reply to David MarchandThis example is missing the experimental flag since it uses an experimental API.
--- examples/rxtx_callbacks/Makefile | 2 ++ 1 file changed, 2 insertions(+)
examples/rxtx_callbacks/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v2 10/11 examples: restore trace point
In reply to David MarchandBefore make removal, those examples were built with experimental flag for tracepoints to be compiled in but the pkg-config part of those makefiles were missed.
--- examples/cmdline/Makefile | 2 ++ examples/distributor/Makefile | 2 ++ examples/ethtool/ethtool-app/Makefile | 2 ++ examples/flow_filtering/Makefile | 2 ++ examples/helloworld/Makefile | 2 ++ examples/ioat/Makefile | 2 ++ examples/ip_reassembly/Makefile | 2 ++ examples/ipv4_multicast/Makefile | 2 ++ examples/l2fwd-cat/Makefile | 2 ++ examples/l2fwd-event/Makefile | 2 ++ examples/l2fwd-jobstats/Makefile | 2 ++ examples/l2fwd-keepalive/Makefile | 2 ++ examples/l2fwd-keepalive/ka-agent/Makefile | 2 ++ examples/l3fwd-acl/Makefile | 2 ++ examples/link_status_interrupt/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++ examples/multi_process/hotplug_mp/Makefile | 2 ++ examples/multi_process/simple_mp/Makefile | 2 ++ examples/multi_process/symmetric_mp/Makefile | 2 ++ examples/packet_ordering/Makefile | 2 ++ examples/ptpclient/Makefile | 2 ++ examples/qos_sched/Makefile | 2 ++ examples/server_node_efd/node/Makefile | 2 ++ examples/server_node_efd/server/Makefile | 2 ++ examples/service_cores/Makefile | 2 ++ examples/skeleton/Makefile | 2 ++ examples/timer/Makefile | 2 ++ examples/vm_power_manager/Makefile | 2 ++ examples/vm_power_manager/guest_cli/Makefile | 2 ++ examples/vmdq/Makefile | 2 ++ examples/vmdq_dcb/Makefile | 2 ++ 32 files changed, 64 insertions(+)
examples/cmdline/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/distributor/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ethtool/ethtool-app/Makefile +2 -0
@@ -31,6 +31,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC += $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/flow_filtering/Makefile +2 -0
@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/helloworld/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ioat/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_reassembly/Makefile +2 -0
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ipv4_multicast/Makefile +2 -0
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-cat/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + LDFLAGS += -lpqos build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
examples/l2fwd-event/Makefile +2 -0
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-jobstats/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/ka-agent/Makefile +2 -0
@@ -30,6 +30,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-acl/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/link_status_interrupt/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/client_server_mp/mp_client/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/client_server_mp/mp_server/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/hotplug_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/simple_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/symmetric_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/packet_ordering/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ptpclient/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/qos_sched/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/server_node_efd/node/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/server_node_efd/server/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/service_cores/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/skeleton/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/timer/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vm_power_manager/Makefile +2 -0
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + ifneq ($(shell $(PKGCONF) --atleast-version=0.9.3 libvirt; echo $$?), 0) $(error vm_power_manager requires libvirt >= 0.9.3) endif
examples/vm_power_manager/guest_cli/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq_dcb/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v2 11/11 devtools: compile all buildable examples with pkg-config
In reply to David MarchandRather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.
Select only buildable examples and test their compilation for the x86-default target.
Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:
$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \ -Dexamples=buildable
---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is for vm_power_manager which is broken,
--- devtools/test-meson-builds.sh | 11 +++++++++-- examples/meson.build | 24 ++++++++++++++++++++++-- meson.build | 2 ++ 3 files changed, 33 insertions(+), 4 deletions(-)
devtools/test-meson-builds.sh +9 -2
@@ -213,7 +213,8 @@ default_machine='nehalem' if ! check_cc_flags "-march=$default_machine" ; then default_machine='corei7' fi -build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine $use_shared +build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine \ + -Dexamples=buildable $use_shared # 32-bit with default compiler if check_cc_flags '-m32' ; then
@@ -266,10 +267,16 @@ pc_file=$(find $DESTDIR -name libdpdk.pc) export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH libdir=$(dirname $(find $DESTDIR -name librte_eal.so)) export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH -examples=${DPDK_BUILD_TEST_EXAMPLES:-"cmdline helloworld l2fwd l3fwd skeleton timer"} # if pkg-config defines the necessary flags, test building some examples if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then export PKGCONF="pkg-config --define-prefix" + examples=${DPDK_BUILD_TEST_EXAMPLES:-} + if [ -z "$examples" ]; then + for mk in $DESTDIR/usr/local/share/dpdk/examples/*/Makefile; do + name=$(basename $(dirname $mk)) + examples="$examples $name" + done + fi for example in $examples; do echo "## Building $example" $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example \
examples/meson.build +22 -2
@@ -55,9 +55,18 @@ endif if get_option('examples').to_lower() == 'all' examples = all_examples allow_skips = true # don't flag an error if we can't build an app + install_buildable = false +elif get_option('examples').to_lower() == 'buildable' + examples = all_examples + allow_skips = true + install_buildable = true # only install examples that can be built + # FIXME: vm_power_manager relies on an internal header and can't build + # outside dpdk tree. + dpdk_examples_exclude += ['vm_power_manager'] else examples = get_option('examples').split(',') allow_skips = false # error out if we can't build a requested app + install_buildable = false endif default_cflags = machine_args if cc.has_argument('-Wno-format-truncation')
@@ -81,10 +90,15 @@ foreach example: examples foreach d:deps var_name = get_option('default_library') + '_rte_' + d if not is_variable(var_name) - error('Missing dependency "@0@" for example "@1@"'.format(d, name)) + message('Missing dependency "@0@" for example "@1@"'.format(d, name)) + build = false + else + dep_objs += [get_variable(var_name)] endif - dep_objs += [get_variable(var_name)] endforeach + endif + + if build if allow_experimental_apis cflags += '-DALLOW_EXPERIMENTAL_API' endif
@@ -98,5 +112,11 @@ foreach example: examples error('Cannot build requested example "' + name + '"') else message('Skipping example "' + name + '"') + if install_buildable + # exclude based on top-level directory only + dir = example.split('/')[0] + dpdk_examples_exclude += dir + message('Excluding example directory "@0@" from install'.format(dir)) + endif endif endforeach
meson.build +2 -0
@@ -58,9 +58,11 @@ subdir('doc') # build any examples explicitly requested - useful for developers - and # install any example code into the appropriate install path +dpdk_examples_exclude = [] subdir('examples') install_subdir('examples', install_dir: get_option('datadir') + '/dpdk', + exclude_directories: dpdk_examples_exclude, exclude_files: 'meson.build') # build kernel modules if enabled
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config
Thomas,
Quoted 2 lines · David Marchand
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
If next-virtio is not pulled yet, we can add a temp:dpdk_examples_exclude += ['vhost']
Signature · 1 line
David Marchand
Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config
In reply to David MarchandQuoted 31 lines · David Marchand
Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.Select only buildable examples and test their compilation for the x86-default target.
Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \ -Dexamples=buildableSuggested-by Bruce Richardson <[email protected]>Signed-off-by David Marchand <[email protected]>---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is forvm_power_managerwhich is broken,
Quoted 1 line
---
I'm not sure my "suggested-by" should be on this, since the idea of adding an extra buildable option is not mine here. I actually think I prefer the previous approach based on your original suggestion of always skipping unbuildable examples. Two reasons for that:
* I'm not fully sure of the value of installing examples that can't be built, which was the original issue you raised.
* I don't like mixing together two separate things - examples to build, and examples to install in a single option.
Therefore, I think we should choose one of two less confusing paths - either lets just always install all applications, or let's always install only those apps which can be built. I'm not massively concerned either way which is chosen, but I don't think we should try and support both and overload options to do so.
/Bruce
Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config
Quoted 33 lines · Bruce Richardson
Quoted 31 lines · David Marchand
Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.Select only buildable examples and test their compilation for the x86-default target.
Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \ -Dexamples=buildableSuggested-by Bruce Richardson <[email protected]>Signed-off-by David Marchand <[email protected]>---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is forvm_power_managerwhich is broken,
Quoted 2 lines
Quoted 1 line
---
I'm not sure my "suggested-by" should be on this, since the idea of adding
I was not sure how to credit my copying of the meson bits :-).
Quoted 5 lines
an extra buildable option is not mine here. I actually think I prefer the previous approach based on your original suggestion of always skipping unbuildable examples. Two reasons for that:
* I'm not fully sure of the value of installing examples that can't be built, which was the original issue you raised.
Thomas objected that all examples have always been provided regardless of the configuration.
The examples serve as documentation and the API/guides documentations are all compiled anyway.
Quoted 2 lines
* I don't like mixing together two separate things - examples to build, and examples to install in a single option.
Yes, I am not entirely happy either.
Time is ticking, I'll just drop this patch for 20.11.
Signature · 1 line
David Marchand
Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config
Quoted 47 lines · David Marchand
Quoted 33 lines · Bruce Richardson
Quoted 31 lines · David Marchand
Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.Select only buildable examples and test their compilation for the x86-default target.
Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \ -Dexamples=buildableSuggested-by Bruce Richardson <[email protected]>Signed-off-by David Marchand <[email protected]>---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is forvm_power_managerwhich is broken,Quoted 2 lines
Quoted 1 line
---
I'm not sure my "suggested-by" should be on this, since the idea of adding
I was not sure how to credit my copying of the meson bits :-).
Quoted 5 lines
an extra buildable option is not mine here. I actually think I prefer the previous approach based on your original suggestion of always skipping unbuildable examples. Two reasons for that:
* I'm not fully sure of the value of installing examples that can't be built, which was the original issue you raised.
Quoted 5 lines
Thomas objected that all examples have always been provided regardless of the configuration.
The examples serve as documentation and the API/guides documentations are all compiled anyway.
Since we are looking to start adding in checks for features into the example makefiles, I'd go with continuing the policy of just shipping them all [1]. Over time we can update the makefiles to start adding proper build error messages with explanations in cases where examples are missing dependencies.
/Bruce
v3 cover Examples compilation fixes
In reply to David MarchandI tested external compilation for all possible examples (in my env). The result is this series.
Signature · 71 lines
David Marchand Changelog since v2: - reworked patch 4 check on crypto driver availability, - added patch 5 to fix misalignment with other examples makefiles, - dropped last patch on checking all examples, Changelog since v1: - added patch 7 to fix performance-thread example, - reworked last patch by introducing a new -Dexamples=buildall special value and removed exceptions for examples recently fixed in main thanks to Bruce, David Marchand (11): examples/fips_validation: fix build with pkg-config examples/ipsec-gw: fix build with pkg-config examples/kni: fix build with pkg-config examples/l2fwd-crypto: fix build with pkg-config examples/l3fwd-graph: fix static build examples/l3fwd-graph: fix pkg-config usage examples/ntb: fix clean target examples/performance-thread: fix build with pkg-config examples/vhost_blk: fix build with pkg-config examples/rxtx_callbacks: fix build with pkg-config examples: restore trace point examples/cmdline/Makefile | 2 ++ examples/distributor/Makefile | 2 ++ examples/ethtool/ethtool-app/Makefile | 2 ++ examples/eventdev_pipeline/Makefile | 2 ++ examples/fips_validation/Makefile | 2 ++ examples/flow_filtering/Makefile | 2 ++ examples/helloworld/Makefile | 2 ++ examples/ioat/Makefile | 2 ++ examples/ip_reassembly/Makefile | 2 ++ examples/ipsec-secgw/Makefile | 1 + examples/ipv4_multicast/Makefile | 2 ++ examples/kni/Makefile | 2 ++ examples/l2fwd-cat/Makefile | 2 ++ examples/l2fwd-crypto/Makefile | 6 ++++++ examples/l2fwd-event/Makefile | 2 ++ examples/l2fwd-jobstats/Makefile | 2 ++ examples/l2fwd-keepalive/Makefile | 2 ++ examples/l2fwd-keepalive/ka-agent/Makefile | 2 ++ examples/l3fwd-acl/Makefile | 2 ++ examples/l3fwd-graph/Makefile | 6 +++--- examples/link_status_interrupt/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++ examples/multi_process/hotplug_mp/Makefile | 2 ++ examples/multi_process/simple_mp/Makefile | 2 ++ examples/multi_process/symmetric_mp/Makefile | 2 ++ examples/ntb/Makefile | 2 +- examples/packet_ordering/Makefile | 2 ++ examples/performance-thread/l3fwd-thread/main.c | 5 +++++ examples/ptpclient/Makefile | 2 ++ examples/qos_sched/Makefile | 2 ++ examples/rxtx_callbacks/Makefile | 2 ++ examples/server_node_efd/node/Makefile | 2 ++ examples/server_node_efd/server/Makefile | 2 ++ examples/service_cores/Makefile | 2 ++ examples/skeleton/Makefile | 2 ++ examples/timer/Makefile | 2 ++ examples/vhost_blk/vhost_blk.c | 6 ++++++ examples/vm_power_manager/Makefile | 2 ++ examples/vm_power_manager/guest_cli/Makefile | 2 ++ examples/vmdq/Makefile | 2 ++ examples/vmdq_dcb/Makefile | 2 ++ 42 files changed, 94 insertions(+), 4 deletions(-) -- 2.23.0
PATCH v3 1/11 examples/fips_validation: fix build with pkg-config
When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated.
--- examples/fips_validation/Makefile | 2 ++ 1 file changed, 2 insertions(+)
examples/fips_validation/Makefile +2 -0
@@ -36,6 +36,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v3 2/11 examples/ipsec-gw: fix build with pkg-config
In reply to David Marchandflow.c: In function ‘parse_flow_tokens’:
flow.c:153:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
153 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:154:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
154 | &rule->ipv4.mask.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~flow.c:170:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
170 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:171:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
171 | &rule->ipv4.mask.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Meson build is fine since we waive those warnings. Replicate it for make.
--- examples/ipsec-secgw/Makefile | 1 + 1 file changed, 1 insertion(+)
examples/ipsec-secgw/Makefile +1 -0
@@ -42,6 +42,7 @@ LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -Wno-address-of-packed-member build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v3 3/11 examples/kni: fix build with pkg-config
In reply to David Marchandrm -f build/kni build/kni-static build/kni-shared test -d build && rmdir -p build || true
[...]/usr/bin/ld: /tmp/cc72ssnK.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
This example explicitly call pthread API and should be linked against the pthread library.
--- examples/kni/Makefile | 2 ++ 1 file changed, 2 insertions(+)
examples/kni/Makefile +2 -0
@@ -27,6 +27,8 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +LDFLAGS += -pthread + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v3 4/11 examples/l2fwd-crypto: fix build with pkg-config
In reply to David MarchandTwo issues fixed here.
First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status
---
Changelog since v2:
- reworked config check,
--- examples/l2fwd-crypto/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/Makefile +6 -0
@@ -26,6 +26,12 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API +CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null) +ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),) +LDFLAGS_SHARED += -lrte_crypto_scheduler +endif + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v3 5/11 examples/l3fwd-graph: fix static build
In reply to David MarchandThis example missed the rework from commit 8549295db07b ("build/pkg-config: improve static linking flags").
--- examples/l3fwd-graph/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd-graph/Makefile +1 -1
@@ -24,7 +24,7 @@ PKGCONF=pkg-config --define-prefix PC_FILE := $(shell $(PKGCONF) --path libdpdk) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) +LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v3 6/11 examples/l3fwd-graph: fix pkg-config usage
In reply to David MarchandThis example missed the fixes from commit 69b1bb49ed82 ("examples: hide error for missing pkg-config path flag") and commit 12a652a02b08 ("examples: fix build with old pkg-config").
--- examples/l3fwd-graph/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
examples/l3fwd-graph/Makefile +2 -2
@@ -19,9 +19,9 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF=pkg-config --define-prefix +PKGCONF ?= pkg-config -PC_FILE := $(shell $(PKGCONF) --path libdpdk) +PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
Signature · 1 line
2.23.0
PATCH v3 7/11 examples/ntb: fix clean target
In reply to David MarchandWhen introducing this example, the cleanup from commit 7e9562a107f1 ("examples: fix make clean when using pkg-config") was missed.
--- examples/ntb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/Makefile +1 -1
@@ -42,4 +42,4 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true
Signature · 1 line
2.23.0
PATCH v3 8/11 examples/performance-thread: fix build with pkg-config
In reply to David Marchandmain.c: In function ‘lthread_tx’:
main.c:2091:25: error: implicit declaration of function ‘sched_getcpu’;
did you mean ‘sched_getparam’? [-Werror=implicit-function-declaration]
2091 | tx_conf->conf.cpu_id = sched_getcpu();
| ^~~~~~~~~~~~
| sched_getparamcc1: all warnings being treated as errors
Explicitly pass _GNU_SOURCE and include missing header (rather than rely on automagic inclusion from other system headers).
--- examples/performance-thread/l3fwd-thread/main.c | 5 +++++ 1 file changed, 5 insertions(+)
examples/performance-thread/l3fwd-thread/main.c +5 -0
@@ -2,6 +2,10 @@* Copyright(c) 2010-2016 Intel Corporation */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include <stdio.h> #include <stdlib.h> #include <stdint.h>
@@ -12,6 +16,7 @@#include <stdarg.h> #include <errno.h> #include <getopt.h> +#include <sched.h> #include <rte_common.h> #include <rte_vect.h>
Signature · 1 line
2.23.0
PATCH v3 9/11 examples/vhost_blk: fix build with pkg-config
In reply to David Marchandvhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]
543 | CPU_ZERO(&cpuset);
| ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
544 | CPU_SET(0, &cpuset);
| ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
545 | pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
| ^~~~~~~~~~~~~~~~~~~~~~/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference to CPU_ZERO' /usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference to CPU_SET'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1
Explicitly pass _GNU_SOURCE and include missing headers (rather than rely on automagic inclusion from other system headers).
--- examples/vhost_blk/vhost_blk.c | 6 ++++++ 1 file changed, 6 insertions(+)
examples/vhost_blk/vhost_blk.c +6 -0
@@ -2,6 +2,12 @@* Copyright(c) 2010-2019 Intel Corporation */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include <pthread.h> +#include <sched.h> +#include <stdint.h> #include <unistd.h> #include <stdbool.h>
Signature · 1 line
2.23.0
PATCH v3 10/11 examples/rxtx_callbacks: fix build with pkg-config
In reply to David MarchandThis example is missing the experimental flag since it uses an experimental API.
--- examples/rxtx_callbacks/Makefile | 2 ++ 1 file changed, 2 insertions(+)
examples/rxtx_callbacks/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
PATCH v3 11/11 examples: restore trace point
In reply to David MarchandBefore make removal, those examples were built with experimental flag for tracepoints to be compiled in but the pkg-config part of those makefiles were missed.
---
Changelog since v2:
- added eventdev_pipeline,
--- examples/cmdline/Makefile | 2 ++ examples/distributor/Makefile | 2 ++ examples/ethtool/ethtool-app/Makefile | 2 ++ examples/eventdev_pipeline/Makefile | 2 ++ examples/flow_filtering/Makefile | 2 ++ examples/helloworld/Makefile | 2 ++ examples/ioat/Makefile | 2 ++ examples/ip_reassembly/Makefile | 2 ++ examples/ipv4_multicast/Makefile | 2 ++ examples/l2fwd-cat/Makefile | 2 ++ examples/l2fwd-event/Makefile | 2 ++ examples/l2fwd-jobstats/Makefile | 2 ++ examples/l2fwd-keepalive/Makefile | 2 ++ examples/l2fwd-keepalive/ka-agent/Makefile | 2 ++ examples/l3fwd-acl/Makefile | 2 ++ examples/link_status_interrupt/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++ examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++ examples/multi_process/hotplug_mp/Makefile | 2 ++ examples/multi_process/simple_mp/Makefile | 2 ++ examples/multi_process/symmetric_mp/Makefile | 2 ++ examples/packet_ordering/Makefile | 2 ++ examples/ptpclient/Makefile | 2 ++ examples/qos_sched/Makefile | 2 ++ examples/server_node_efd/node/Makefile | 2 ++ examples/server_node_efd/server/Makefile | 2 ++ examples/service_cores/Makefile | 2 ++ examples/skeleton/Makefile | 2 ++ examples/timer/Makefile | 2 ++ examples/vm_power_manager/Makefile | 2 ++ examples/vm_power_manager/guest_cli/Makefile | 2 ++ examples/vmdq/Makefile | 2 ++ examples/vmdq_dcb/Makefile | 2 ++ 33 files changed, 66 insertions(+)
examples/cmdline/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/distributor/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ethtool/ethtool-app/Makefile +2 -0
@@ -31,6 +31,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC += $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/eventdev_pipeline/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/flow_filtering/Makefile +2 -0
@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/helloworld/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ioat/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_reassembly/Makefile +2 -0
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ipv4_multicast/Makefile +2 -0
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-cat/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + LDFLAGS += -lpqos build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
examples/l2fwd-event/Makefile +2 -0
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-jobstats/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/ka-agent/Makefile +2 -0
@@ -30,6 +30,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-acl/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/link_status_interrupt/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/client_server_mp/mp_client/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/client_server_mp/mp_server/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/hotplug_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/simple_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/multi_process/symmetric_mp/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/packet_ordering/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ptpclient/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/qos_sched/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/server_node_efd/node/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/server_node_efd/server/Makefile +2 -0
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/service_cores/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/skeleton/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/timer/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vm_power_manager/Makefile +2 -0
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + ifneq ($(shell $(PKGCONF) --atleast-version=0.9.3 libvirt; echo $$?), 0) $(error vm_power_manager requires libvirt >= 0.9.3) endif
examples/vm_power_manager/guest_cli/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq_dcb/Makefile +2 -0
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
Thomas Monjalon
Applied14/11/2020 10:05, David Marchand:
Quoted 15 lines
I tested external compilation for all possible examples (in my env). The result is this series.
David Marchand (11):
examples/fips_validation: fix build with pkg-config examples/ipsec-gw: fix build with pkg-config examples/kni: fix build with pkg-config examples/l2fwd-crypto: fix build with pkg-config examples/l3fwd-graph: fix static build examples/l3fwd-graph: fix pkg-config usage examples/ntb: fix clean target examples/performance-thread: fix build with pkg-config examples/vhost_blk: fix build with pkg-config examples/rxtx_callbacks: fix build with pkg-config
examples: restore trace point
I think all patches are candidates for backport. I've decided to add Cc: [email protected] where is was not.
Applied, thanks