I stepped right into Bruce trap [1] and tested all possible examples. The result is this series. 1: https://patchwork.dpdk.org/patch/82361/ -- 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
When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated. Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/fips_validation/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index 7ba9bcfea6..8f82a4c6c5 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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) -- 2.23.0
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. Fixes: 8e693616fcb2 ("examples/ipsec-secgw: enable flow based distribution") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/ipsec-secgw/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 5e6cb51eac..7670cc3684 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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) -- 2.23.0
rm -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. Fixes: 724beb913b44 ("examples/kni: monitor and update link state continually") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/kni/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index fa9fa85319..bdc8a2aabe 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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) -- 2.23.0
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 status Fixes: e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions") Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/l2fwd-crypto/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 4953ee2b95..211a076699 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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) -- 2.23.0
This example missed the rework from commit 8549295db07b ("build/pkg-config: improve static linking flags"). Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/l3fwd-graph/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile index 368ac21147..1e4f0600ae 100644 --- a/examples/l3fwd-graph/Makefile +++ b/examples/l3fwd-graph/Makefile @@ -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) -- 2.23.0
When 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") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/ntb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile index 4675570fd2..d35dabc471 100644 --- a/examples/ntb/Makefile +++ b/examples/ntb/Makefile @@ -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 -- 2.23.0
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 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). Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/vhost_blk/vhost_blk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index 8f5d61a589..bb293d492f 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -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> -- 2.23.0
This example is missing the experimental flag since it uses an experimental API. Fixes: cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/rxtx_callbacks/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index bac3015d34..a618cdf751 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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) -- 2.23.0
Compiling 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/ Signed-off-by: David Marchand <david.marchand@redhat.com> --- devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 0c95d1cc98..8e26d0808d 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.23.0
Before 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. Fixes: 78d44153de8f ("ethdev: add tracepoints") Signed-off-by: David Marchand <david.marchand@redhat.com> --- 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(+) diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index d8f51fb39b..09da84ba0b 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 4116064581..d7615f9a32 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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) diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 5ebeb200a8..93ef5c27c3 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -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) diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index 0577e52985..9bc9179346 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 2eef6e4527..436569f5a6 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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) diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile index 9645c27d2f..c13ad8d8af 100644 --- a/examples/ioat/Makefile +++ b/examples/ioat/Makefile @@ -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) diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 479b802907..740f4721d0 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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) diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index fb1ebdd433..7ea44e6f63 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index c5f82fb548..9ba1135612 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile index 109b7caa4e..384224b24a 100644 --- a/examples/l2fwd-event/Makefile +++ b/examples/l2fwd-event/Makefile @@ -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) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index d3ff2d3ee9..fcb60b2a33 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index c327efab36..09a891149b 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/ka-agent/Makefile b/examples/l2fwd-keepalive/ka-agent/Makefile index 700137c2e2..8b329a78b1 100644 --- a/examples/l2fwd-keepalive/ka-agent/Makefile +++ b/examples/l2fwd-keepalive/ka-agent/Makefile @@ -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) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index eeb6288dae..3420ea3a9c 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index b9b02124a4..fa608c56a0 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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) diff --git a/examples/multi_process/client_server_mp/mp_client/Makefile b/examples/multi_process/client_server_mp/mp_client/Makefile index b723e545b7..bc00a1c875 100644 --- a/examples/multi_process/client_server_mp/mp_client/Makefile +++ b/examples/multi_process/client_server_mp/mp_client/Makefile @@ -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) diff --git a/examples/multi_process/client_server_mp/mp_server/Makefile b/examples/multi_process/client_server_mp/mp_server/Makefile index f49260a256..d066524b36 100644 --- a/examples/multi_process/client_server_mp/mp_server/Makefile +++ b/examples/multi_process/client_server_mp/mp_server/Makefile @@ -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) diff --git a/examples/multi_process/hotplug_mp/Makefile b/examples/multi_process/hotplug_mp/Makefile index 2c023a73d8..3122449d62 100644 --- a/examples/multi_process/hotplug_mp/Makefile +++ b/examples/multi_process/hotplug_mp/Makefile @@ -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) diff --git a/examples/multi_process/simple_mp/Makefile b/examples/multi_process/simple_mp/Makefile index 410f8b5368..d03597c4c2 100644 --- a/examples/multi_process/simple_mp/Makefile +++ b/examples/multi_process/simple_mp/Makefile @@ -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) diff --git a/examples/multi_process/symmetric_mp/Makefile b/examples/multi_process/symmetric_mp/Makefile index df69ecabe7..45b7214cba 100644 --- a/examples/multi_process/symmetric_mp/Makefile +++ b/examples/multi_process/symmetric_mp/Makefile @@ -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) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index e8d6c57b72..09abda91ea 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 86059d8b28..9f56a5e7a0 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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) diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 408074a9f5..f42406fe1c 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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) diff --git a/examples/server_node_efd/node/Makefile b/examples/server_node_efd/node/Makefile index a4efef42dc..2120de5397 100644 --- a/examples/server_node_efd/node/Makefile +++ b/examples/server_node_efd/node/Makefile @@ -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) diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile index 106e1abd74..6b5878d8c0 100644 --- a/examples/server_node_efd/server/Makefile +++ b/examples/server_node_efd/server/Makefile @@ -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) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index beb7ea0b82..754333c878 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index ca52abba42..4fa97cb975 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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) diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 0f6523afa6..70b1af9f4b 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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) diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index 027d17c7ef..8ac1180b2f 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -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 diff --git a/examples/vm_power_manager/guest_cli/Makefile b/examples/vm_power_manager/guest_cli/Makefile index b84deec574..1ee1ca1017 100644 --- a/examples/vm_power_manager/guest_cli/Makefile +++ b/examples/vm_power_manager/guest_cli/Makefile @@ -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) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index de527281eb..749ed53c6f 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 9c9049d85e..1dd42105d6 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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) -- 2.23.0
On Tue, Nov 10, 2020 at 04:12:18PM +0100, David Marchand wrote:
> Compiling 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/
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++-
> 1 file changed, 27 insertions(+), 1 deletion(-)
>
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index 0c95d1cc98..8e26d0808d 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -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"
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
On Tue, Nov 10, 2020 at 04:12:09PM +0100, David Marchand wrote:
> I stepped right into Bruce trap [1] and tested all possible examples.
> The result is this series.
>
> 1: https://patchwork.dpdk.org/patch/82361/
>
> --
> 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>
On Tue, Nov 10, 2020 at 04:12:18PM +0100, David Marchand wrote: > Compiling 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/ > > Signed-off-by: David Marchand <david.marchand@redhat.com> > --- > devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh > index 0c95d1cc98..8e26d0808d 100755 > --- a/devtools/test-meson-builds.sh > +++ b/devtools/test-meson-builds.sh > @@ -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" The issues with the missing common files for all of above should be fixed by patch [1] /Bruce [1] http://patches.dpdk.org/patch/83911/
On Tue, Nov 10, 2020 at 6:19 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> > + # 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.
--
David Marchand
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Tuesday, November 10, 2020 23:12
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; Richardson, Bruce <bruce.richardson@intel.com>;
> stable@dpdk.org; Li, Xiaoyun <xiaoyun.li@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xiaolong Ye <xiaolong.ye@intel.com>
> Subject: [PATCH 06/10] examples/ntb: fix clean target
>
> When 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> examples/ntb/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile index
> 4675570fd2..d35dabc471 100644
> --- a/examples/ntb/Makefile
> +++ b/examples/ntb/Makefile
> @@ -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
> --
> 2.23.0
Thanks for the catch.
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
I tested external compilation for all possible examples (in my env). The result is this series. -- 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
When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated. Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/fips_validation/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index 7ba9bcfea6..8f82a4c6c5 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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) -- 2.23.0
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. Fixes: 8e693616fcb2 ("examples/ipsec-secgw: enable flow based distribution") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/ipsec-secgw/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 5e6cb51eac..7670cc3684 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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) -- 2.23.0
rm -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. Fixes: 724beb913b44 ("examples/kni: monitor and update link state continually") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/kni/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index fa9fa85319..bdc8a2aabe 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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) -- 2.23.0
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 status Fixes: e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions") Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/l2fwd-crypto/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 4953ee2b95..211a076699 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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) -- 2.23.0
This example missed the rework from commit 8549295db07b ("build/pkg-config: improve static linking flags"). Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/l3fwd-graph/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile index 368ac21147..1e4f0600ae 100644 --- a/examples/l3fwd-graph/Makefile +++ b/examples/l3fwd-graph/Makefile @@ -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) -- 2.23.0
When 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") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com> --- examples/ntb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile index 4675570fd2..d35dabc471 100644 --- a/examples/ntb/Makefile +++ b/examples/ntb/Makefile @@ -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 -- 2.23.0
main.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_getparam cc1: all warnings being treated as errors Explicitly pass _GNU_SOURCE and include missing header (rather than rely on automagic inclusion from other system headers). Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/performance-thread/l3fwd-thread/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 7bf61db6be..4d82fb82ef 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -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> -- 2.23.0
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 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). Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vhost_blk/vhost_blk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index 8f5d61a589..bb293d492f 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -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> -- 2.23.0
This example is missing the experimental flag since it uses an experimental API. Fixes: cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/rxtx_callbacks/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index bac3015d34..a618cdf751 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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) -- 2.23.0
Before 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. Fixes: 78d44153de8f ("ethdev: add tracepoints") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- 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(+) diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index d8f51fb39b..09da84ba0b 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 4116064581..d7615f9a32 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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) diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 5ebeb200a8..93ef5c27c3 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -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) diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index 0577e52985..9bc9179346 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 2eef6e4527..436569f5a6 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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) diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile index 9645c27d2f..c13ad8d8af 100644 --- a/examples/ioat/Makefile +++ b/examples/ioat/Makefile @@ -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) diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 479b802907..740f4721d0 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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) diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index fb1ebdd433..7ea44e6f63 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index c5f82fb548..9ba1135612 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile index 109b7caa4e..384224b24a 100644 --- a/examples/l2fwd-event/Makefile +++ b/examples/l2fwd-event/Makefile @@ -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) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index d3ff2d3ee9..fcb60b2a33 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index c327efab36..09a891149b 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/ka-agent/Makefile b/examples/l2fwd-keepalive/ka-agent/Makefile index 700137c2e2..8b329a78b1 100644 --- a/examples/l2fwd-keepalive/ka-agent/Makefile +++ b/examples/l2fwd-keepalive/ka-agent/Makefile @@ -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) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index eeb6288dae..3420ea3a9c 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index b9b02124a4..fa608c56a0 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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) diff --git a/examples/multi_process/client_server_mp/mp_client/Makefile b/examples/multi_process/client_server_mp/mp_client/Makefile index b723e545b7..bc00a1c875 100644 --- a/examples/multi_process/client_server_mp/mp_client/Makefile +++ b/examples/multi_process/client_server_mp/mp_client/Makefile @@ -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) diff --git a/examples/multi_process/client_server_mp/mp_server/Makefile b/examples/multi_process/client_server_mp/mp_server/Makefile index f49260a256..d066524b36 100644 --- a/examples/multi_process/client_server_mp/mp_server/Makefile +++ b/examples/multi_process/client_server_mp/mp_server/Makefile @@ -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) diff --git a/examples/multi_process/hotplug_mp/Makefile b/examples/multi_process/hotplug_mp/Makefile index 2c023a73d8..3122449d62 100644 --- a/examples/multi_process/hotplug_mp/Makefile +++ b/examples/multi_process/hotplug_mp/Makefile @@ -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) diff --git a/examples/multi_process/simple_mp/Makefile b/examples/multi_process/simple_mp/Makefile index 410f8b5368..d03597c4c2 100644 --- a/examples/multi_process/simple_mp/Makefile +++ b/examples/multi_process/simple_mp/Makefile @@ -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) diff --git a/examples/multi_process/symmetric_mp/Makefile b/examples/multi_process/symmetric_mp/Makefile index df69ecabe7..45b7214cba 100644 --- a/examples/multi_process/symmetric_mp/Makefile +++ b/examples/multi_process/symmetric_mp/Makefile @@ -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) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index e8d6c57b72..09abda91ea 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 86059d8b28..9f56a5e7a0 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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) diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 408074a9f5..f42406fe1c 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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) diff --git a/examples/server_node_efd/node/Makefile b/examples/server_node_efd/node/Makefile index a4efef42dc..2120de5397 100644 --- a/examples/server_node_efd/node/Makefile +++ b/examples/server_node_efd/node/Makefile @@ -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) diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile index 106e1abd74..6b5878d8c0 100644 --- a/examples/server_node_efd/server/Makefile +++ b/examples/server_node_efd/server/Makefile @@ -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) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index beb7ea0b82..754333c878 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index ca52abba42..4fa97cb975 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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) diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 0f6523afa6..70b1af9f4b 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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) diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index 027d17c7ef..8ac1180b2f 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -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 diff --git a/examples/vm_power_manager/guest_cli/Makefile b/examples/vm_power_manager/guest_cli/Makefile index b84deec574..1ee1ca1017 100644 --- a/examples/vm_power_manager/guest_cli/Makefile +++ b/examples/vm_power_manager/guest_cli/Makefile @@ -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) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index de527281eb..749ed53c6f 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 9c9049d85e..1dd42105d6 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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) -- 2.23.0
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=buildable Suggested-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: David Marchand <david.marchand@redhat.com> --- 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(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 3ce49368cf..a04f3eb7ff 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 \ diff --git a/examples/meson.build b/examples/meson.build index 46ec80919e..a23ab79e8c 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -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 diff --git a/meson.build b/meson.build index 45d974cd2c..559a9d2f1b 100644 --- a/meson.build +++ b/meson.build @@ -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 -- 2.23.0
Thomas,
On Fri, Nov 13, 2020 at 1:28 PM David Marchand
<david.marchand@redhat.com> wrote:
> - 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']
--
David Marchand
On 11/13/20 1:24 PM, David Marchand wrote:
> 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 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).
>
> Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> examples/vhost_blk/vhost_blk.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
> index 8f5d61a589..bb293d492f 100644
> --- a/examples/vhost_blk/vhost_blk.c
> +++ b/examples/vhost_blk/vhost_blk.c
> @@ -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>
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
On Fri, Nov 13, 2020 at 01:24:23PM +0100, David Marchand wrote: > 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 status > > Fixes: e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions") > Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") > > Signed-off-by: David Marchand <david.marchand@redhat.com> > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > --- > examples/l2fwd-crypto/Makefile | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile > index 4953ee2b95..211a076699 100644 > --- a/examples/l2fwd-crypto/Makefile > +++ b/examples/l2fwd-crypto/Makefile > @@ -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 > +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) > > -- > 2.23.0 >
On Fri, Nov 13, 2020 at 01:24:30PM +0100, David Marchand wrote:
> 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=buildable
>
> Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> 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,
>
> ---
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
On Fri, Nov 13, 2020 at 3:06 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > On Fri, Nov 13, 2020 at 01:24:30PM +0100, David Marchand wrote: > > 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=buildable > > > > Suggested-by: Bruce Richardson <bruce.richardson@intel.com> > > Signed-off-by: David Marchand <david.marchand@redhat.com> > > --- > > 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, > > > > --- > 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 :-). > 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. > * 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. -- David Marchand
On Fri, Nov 13, 2020 at 2:53 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> > +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.
I'll have a try..
--
David Marchand
On Fri, Nov 13, 2020 at 03:14:14PM +0100, David Marchand wrote: > On Fri, Nov 13, 2020 at 3:06 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > On Fri, Nov 13, 2020 at 01:24:30PM +0100, David Marchand wrote: > > > 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=buildable > > > > > > Suggested-by: Bruce Richardson <bruce.richardson@intel.com> > > > Signed-off-by: David Marchand <david.marchand@redhat.com> > > > --- > > > 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, > > > > > > --- > > 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 :-). > > > > 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. > 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 [1] http://patches.dpdk.org/patch/83911/
On Fri, Nov 13, 2020 at 3:15 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Fri, Nov 13, 2020 at 2:53 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > > +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.
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -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.
--
David Marchand
On Fri, Nov 13, 2020 at 04:41:52PM +0100, David Marchand wrote:
> On Fri, Nov 13, 2020 at 3:15 PM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > On Fri, Nov 13, 2020 at 2:53 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > > > +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.
>
> --- a/examples/l2fwd-crypto/Makefile
> +++ b/examples/l2fwd-crypto/Makefile
> @@ -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.
I tested external compilation for all possible examples (in my env). The result is this series. -- 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
When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated. Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/fips_validation/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index 7ba9bcfea6..8f82a4c6c5 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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) -- 2.23.0
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. Fixes: 8e693616fcb2 ("examples/ipsec-secgw: enable flow based distribution") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/ipsec-secgw/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 5e6cb51eac..7670cc3684 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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) -- 2.23.0
rm -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. Fixes: 724beb913b44 ("examples/kni: monitor and update link state continually") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/kni/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index fa9fa85319..bbf3bcae12 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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) -- 2.23.0
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 status Fixes: e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions") Fixes: 261bbff75e34 ("examples: use separate crypto session mempools") Signed-off-by: David Marchand <david.marchand@redhat.com> --- Changelog since v2: - reworked config check, --- examples/l2fwd-crypto/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 4953ee2b95..7731eccd03 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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) -- 2.23.0
This example missed the rework from commit 8549295db07b ("build/pkg-config: improve static linking flags"). Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/l3fwd-graph/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile index 368ac21147..1e4f0600ae 100644 --- a/examples/l3fwd-graph/Makefile +++ b/examples/l3fwd-graph/Makefile @@ -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) -- 2.23.0
This 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"). Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/l3fwd-graph/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile index 1e4f0600ae..6e3d0bca06 100644 --- a/examples/l3fwd-graph/Makefile +++ b/examples/l3fwd-graph/Makefile @@ -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) -- 2.23.0
When 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") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com> --- examples/ntb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile index 4675570fd2..d35dabc471 100644 --- a/examples/ntb/Makefile +++ b/examples/ntb/Makefile @@ -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 -- 2.23.0
main.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_getparam cc1: all warnings being treated as errors Explicitly pass _GNU_SOURCE and include missing header (rather than rely on automagic inclusion from other system headers). Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> --- examples/performance-thread/l3fwd-thread/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 7bf61db6be..4d82fb82ef 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -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> -- 2.23.0
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 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). Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vhost_blk/vhost_blk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index 8f5d61a589..bb293d492f 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -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> -- 2.23.0
This example is missing the experimental flag since it uses an experimental API. Fixes: cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/rxtx_callbacks/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index bac3015d34..a618cdf751 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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) -- 2.23.0
Before 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. Fixes: 78d44153de8f ("ethdev: add tracepoints") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- 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(+) diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index d8f51fb39b..09da84ba0b 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 4116064581..d7615f9a32 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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) diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 5ebeb200a8..93ef5c27c3 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -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) diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 05c6f865ad..f5072a2b0c 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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) diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index 0577e52985..9bc9179346 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 2eef6e4527..436569f5a6 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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) diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile index 9645c27d2f..c13ad8d8af 100644 --- a/examples/ioat/Makefile +++ b/examples/ioat/Makefile @@ -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) diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 479b802907..740f4721d0 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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) diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index fb1ebdd433..7ea44e6f63 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index c5f82fb548..9ba1135612 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile index 109b7caa4e..384224b24a 100644 --- a/examples/l2fwd-event/Makefile +++ b/examples/l2fwd-event/Makefile @@ -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) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index d3ff2d3ee9..fcb60b2a33 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index c327efab36..09a891149b 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/ka-agent/Makefile b/examples/l2fwd-keepalive/ka-agent/Makefile index 700137c2e2..8b329a78b1 100644 --- a/examples/l2fwd-keepalive/ka-agent/Makefile +++ b/examples/l2fwd-keepalive/ka-agent/Makefile @@ -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) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index eeb6288dae..3420ea3a9c 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index b9b02124a4..fa608c56a0 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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) diff --git a/examples/multi_process/client_server_mp/mp_client/Makefile b/examples/multi_process/client_server_mp/mp_client/Makefile index b723e545b7..bc00a1c875 100644 --- a/examples/multi_process/client_server_mp/mp_client/Makefile +++ b/examples/multi_process/client_server_mp/mp_client/Makefile @@ -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) diff --git a/examples/multi_process/client_server_mp/mp_server/Makefile b/examples/multi_process/client_server_mp/mp_server/Makefile index f49260a256..d066524b36 100644 --- a/examples/multi_process/client_server_mp/mp_server/Makefile +++ b/examples/multi_process/client_server_mp/mp_server/Makefile @@ -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) diff --git a/examples/multi_process/hotplug_mp/Makefile b/examples/multi_process/hotplug_mp/Makefile index 2c023a73d8..3122449d62 100644 --- a/examples/multi_process/hotplug_mp/Makefile +++ b/examples/multi_process/hotplug_mp/Makefile @@ -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) diff --git a/examples/multi_process/simple_mp/Makefile b/examples/multi_process/simple_mp/Makefile index 410f8b5368..d03597c4c2 100644 --- a/examples/multi_process/simple_mp/Makefile +++ b/examples/multi_process/simple_mp/Makefile @@ -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) diff --git a/examples/multi_process/symmetric_mp/Makefile b/examples/multi_process/symmetric_mp/Makefile index df69ecabe7..45b7214cba 100644 --- a/examples/multi_process/symmetric_mp/Makefile +++ b/examples/multi_process/symmetric_mp/Makefile @@ -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) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index e8d6c57b72..09abda91ea 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 86059d8b28..9f56a5e7a0 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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) diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 408074a9f5..f42406fe1c 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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) diff --git a/examples/server_node_efd/node/Makefile b/examples/server_node_efd/node/Makefile index a4efef42dc..2120de5397 100644 --- a/examples/server_node_efd/node/Makefile +++ b/examples/server_node_efd/node/Makefile @@ -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) diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile index 106e1abd74..6b5878d8c0 100644 --- a/examples/server_node_efd/server/Makefile +++ b/examples/server_node_efd/server/Makefile @@ -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) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index beb7ea0b82..754333c878 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index ca52abba42..4fa97cb975 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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) diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 0f6523afa6..70b1af9f4b 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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) diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index 027d17c7ef..8ac1180b2f 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -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 diff --git a/examples/vm_power_manager/guest_cli/Makefile b/examples/vm_power_manager/guest_cli/Makefile index b84deec574..1ee1ca1017 100644 --- a/examples/vm_power_manager/guest_cli/Makefile +++ b/examples/vm_power_manager/guest_cli/Makefile @@ -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) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index de527281eb..749ed53c6f 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 9c9049d85e..1dd42105d6 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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) -- 2.23.0
14/11/2020 10:05, David Marchand:
> 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: stable@dpdk.org where is was not.
Applied, thanks
> 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.
>
> Fixes: 8e693616fcb2 ("examples/ipsec-secgw: enable flow based
> distribution")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>