Skip to contentSkip to conversation

Examples compilation fixes

PATCH Superseded David Marchand 6 participants 51 messages Nov 10, 2020 – Nov 16, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover Examples compilation fixes

I stepped right into Bruce trap [1] and tested all possible examples. The result is this series.

1: https://patchwork.dpdk.org/patch/82361/

Signature · 59 lines
David Marchand

David Marchand (10):
  examples/fips_validation: fix build with pkg-config
  examples/ipsec-gw: fix build with pkg-config
  examples/kni: fix build with pkg-config
  examples/l2fwd-crypto: fix build with pkg-config
  examples/l3fwd-graph: fix static build
  examples/ntb: fix clean target
  examples/vhost_blk: fix build with pkg-config
  examples/rxtx_callbacks: fix build with pkg-config
  devtools: compile all examples with pkg-config
  examples: restore trace point

 devtools/test-meson-builds.sh                 | 28 ++++++++++++++++++-
 examples/cmdline/Makefile                     |  2 ++
 examples/distributor/Makefile                 |  2 ++
 examples/ethtool/ethtool-app/Makefile         |  2 ++
 examples/fips_validation/Makefile             |  2 ++
 examples/flow_filtering/Makefile              |  2 ++
 examples/helloworld/Makefile                  |  2 ++
 examples/ioat/Makefile                        |  2 ++
 examples/ip_reassembly/Makefile               |  2 ++
 examples/ipsec-secgw/Makefile                 |  1 +
 examples/ipv4_multicast/Makefile              |  2 ++
 examples/kni/Makefile                         |  1 +
 examples/l2fwd-cat/Makefile                   |  2 ++
 examples/l2fwd-crypto/Makefile                |  6 ++++
 examples/l2fwd-event/Makefile                 |  2 ++
 examples/l2fwd-jobstats/Makefile              |  2 ++
 examples/l2fwd-keepalive/Makefile             |  2 ++
 examples/l2fwd-keepalive/ka-agent/Makefile    |  2 ++
 examples/l3fwd-acl/Makefile                   |  2 ++
 examples/l3fwd-graph/Makefile                 |  2 +-
 examples/link_status_interrupt/Makefile       |  2 ++
 .../client_server_mp/mp_client/Makefile       |  2 ++
 .../client_server_mp/mp_server/Makefile       |  2 ++
 examples/multi_process/hotplug_mp/Makefile    |  2 ++
 examples/multi_process/simple_mp/Makefile     |  2 ++
 examples/multi_process/symmetric_mp/Makefile  |  2 ++
 examples/ntb/Makefile                         |  2 +-
 examples/packet_ordering/Makefile             |  2 ++
 examples/ptpclient/Makefile                   |  2 ++
 examples/qos_sched/Makefile                   |  2 ++
 examples/rxtx_callbacks/Makefile              |  2 ++
 examples/server_node_efd/node/Makefile        |  2 ++
 examples/server_node_efd/server/Makefile      |  2 ++
 examples/service_cores/Makefile               |  2 ++
 examples/skeleton/Makefile                    |  2 ++
 examples/timer/Makefile                       |  2 ++
 examples/vhost_blk/vhost_blk.c                |  6 ++++
 examples/vm_power_manager/Makefile            |  2 ++
 examples/vm_power_manager/guest_cli/Makefile  |  2 ++
 examples/vmdq/Makefile                        |  2 ++
 examples/vmdq_dcb/Makefile                    |  2 ++
 41 files changed, 111 insertions(+), 3 deletions(-)

-- 
2.23.0
#1 lore raw

PATCH 1/10 examples/fips_validation: fix build with pkg-config

When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated.

Fixes 261bbff75e34 ("examples: use separate crypto session mempools")
---
 examples/fips_validation/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/fips_validation/Makefile +2 -0
index 7ba9bcfea6..8f82a4c6c5 100644
@@ -36,6 +36,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#2 lore raw

PATCH 2/10 examples/ipsec-gw: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/ipsec-secgw/Makefile | 1 +
 1 file changed, 1 insertion(+)
examples/ipsec-secgw/Makefile +1 -0
index 5e6cb51eac..7670cc3684 100644
@@ -42,6 +42,7 @@ LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
+CFLAGS += -Wno-address-of-packed-member
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
#3 lore raw

PATCH 3/10 examples/kni: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/kni/Makefile | 1 +
 1 file changed, 1 insertion(+)
examples/kni/Makefile +1 -0
index fa9fa85319..bdc8a2aabe 100644
@@ -24,6 +24,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 CFLAGS += -DALLOW_EXPERIMENTAL_API
+LDFLAGS += -pthread
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
Signature · 1 line
2.23.0
#4 lore raw

PATCH 4/10 examples/l2fwd-crypto: fix build with pkg-config

In reply to David Marchand

Two issues fixed here.

First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:
/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status

Fixes e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")
Fixes 261bbff75e34 ("examples: use separate crypto session mempools")
---
 examples/l2fwd-crypto/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/Makefile +6 -0
index 4953ee2b95..211a076699 100644
@@ -24,8 +24,14 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1)
+ifeq ($(NEED_CRYPTO_SCHEDULER), 1)
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#5 lore raw

PATCH 5/10 examples/l3fwd-graph: fix static build

In reply to David Marchand

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")
---
 examples/l3fwd-graph/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd-graph/Makefile +1 -1
index 368ac21147..1e4f0600ae 100644
@@ -24,7 +24,7 @@ PKGCONF=pkg-config --define-prefix
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
#6 lore raw

PATCH 6/10 examples/ntb: fix clean target

In reply to David Marchand

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")
---
 examples/ntb/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/Makefile +1 -1
index 4675570fd2..d35dabc471 100644
@@ -42,4 +42,4 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
Signature · 1 line
2.23.0
Acked-by on v1 6/10
#7 lore raw

Re: [dpdk-dev] [PATCH 06/10] examples/ntb: fix clean target

Quoted 33 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Tuesday, November 10, 2020 23:12
To: [email protected]
Cc: [email protected]; Richardson, Bruce <[email protected]>; [email protected]; Li, Xiaoyun <[email protected]>; Wu, Jingjing <[email protected]>; Xiaolong Ye <[email protected]>
Subject: [PATCH 06/10] examples/ntb: fix clean 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")
---
 examples/ntb/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/Makefile index renamed from examples/ntb/Makefile +0 -0

4675570fd2..d35dabc471 100644

examples/ntb/Makefile +1 -2
@@ -42,4 +42,4 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
--
Quoted 1 line

2.23.0

Thanks for the catch.

#8 lore raw

PATCH 7/10 examples/vhost_blk: fix build with pkg-config

In reply to David Marchand

vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]

  543 |  CPU_ZERO(&cpuset);
      |  ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
  544 |  CPU_SET(0, &cpuset);
      |  ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
  545 |  pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
      |  ^~~~~~~~~~~~~~~~~~~~~~

/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference 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")
---
 examples/vhost_blk/vhost_blk.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/vhost_blk/vhost_blk.c +6 -0
index 8f5d61a589..bb293d492f 100644
@@ -2,6 +2,12 @@
  * Copyright(c) 2010-2019 Intel Corporation
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <pthread.h>
+#include <sched.h>
+
 #include <stdint.h>
 #include <unistd.h>
 #include <stdbool.h>
Signature · 1 line
2.23.0
#9 lore raw

PATCH 8/10 examples/rxtx_callbacks: fix build with pkg-config

In reply to David Marchand

This example is missing the experimental flag since it uses an experimental API.

Fixes cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp")
---
 examples/rxtx_callbacks/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/rxtx_callbacks/Makefile +2 -0
index bac3015d34..a618cdf751 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#10 lore raw

PATCH 9/10 devtools: compile all examples with pkg-config

In reply to David Marchand

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/

---
 devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +27 -1
index 0c95d1cc98..8e26d0808d 100755
@@ -268,7 +268,33 @@ export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
 # if pkg-config defines the necessary flags, test building some examples
 if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
 	export PKGCONF="pkg-config --define-prefix"
-	for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
+	export LD_LIBRARY_PATH=$(dirname $(find $DESTDIR -name librte_eal.so)):$LD_LIBRARY_PATH
+	examples_to_test=${DPDK_BUILD_TEST_EXAMPLES:-}
+	if [ -z "$examples_to_test" ]; then
+		##################
+		# FIXME examples #
+		##################
+		skipped=""
+		# Relies on librte_power internal header
+		skipped="$skipped guest_cli vm_power_manager"
+		# Expects libqos
+		skipped="$skipped l2fwd-cat"
+		# performance-thread/{l3fwd-thread,pthread_shim} expect common .mk
+		skipped="$skipped l3fwd-thread pthread_shim"
+		# client_server_mp/{mp_server,mp_client} expect common headers
+		skipped="$skipped mp_client mp_server"
+		# server_node_efd/{node,server} expect common headers
+		skipped="$skipped node server"
+		# waiting for fixes
+		skipped="$skipped vhost"
+		for mk in $DESTDIR/usr/local/share/dpdk/examples/*/Makefile; do
+			name=$(basename $(dirname $mk))
+			[ "$skipped" = "${skipped/ $name}" ] ||
+				continue
+			examples_to_test="$examples_to_test $name"
+		done
+	fi
+	for example in $examples_to_test; do
 		echo "## Building $example"
 		$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean shared static
 	done
Signature · 1 line
2.23.0
#11 lore raw

Re: [dpdk-dev] [PATCH 09/10] devtools: compile all examples with pkg-config

Quoted 26 lines · David Marchand

Compiling examples out of meson must be tested so that those examples Makefile work.
This is based on Bruce patch [1], waiting for it (or an equivalent) to be merged.

1: https://patchwork.dpdk.org/patch/82361/

---
 devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +5 -1
index 0c95d1cc98..8e26d0808d 100755
@@ -268,7 +268,33 @@ export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
 # if pkg-config defines the necessary flags, test building some examples
 if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
 	export PKGCONF="pkg-config --define-prefix"
-	for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
+	export LD_LIBRARY_PATH=$(dirname $(find $DESTDIR -name librte_eal.so)):$LD_LIBRARY_PATH
+	examples_to_test=${DPDK_BUILD_TEST_EXAMPLES:-}
+	if [ -z "$examples_to_test" ]; then
+		##################
+		# FIXME examples #

devtools/test-meson-builds.sh export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH · line 285

Quoted 10 lines
devtools/test-meson-builds.sh +10 -0
+		##################
+		skipped=""
+		# Relies on librte_power internal header
+		skipped="$skipped guest_cli vm_power_manager"
+		# Expects libqos
+		skipped="$skipped l2fwd-cat"
+		# performance-thread/{l3fwd-thread,pthread_shim} expect common .mk
+		skipped="$skipped l3fwd-thread pthread_shim"
+		# client_server_mp/{mp_server,mp_client} expect common headers
+		skipped="$skipped mp_client mp_server"

I was initially confused by this, because they build fine for me. However, I realised I was running the build from within the examples source folder, rather than as installed in the install folder. The examples directory seems more flattened there, which is the cause of the problems. I will investigate.

/Bruce

#12 lore raw

Re: [dpdk-dev] [PATCH 09/10] devtools: compile all examples with pkg-config

In reply to David Marchand
Quoted 28 lines · David Marchand

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/

---
 devtools/test-meson-builds.sh | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +7 -1
index 0c95d1cc98..8e26d0808d 100755
@@ -268,7 +268,33 @@ export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
 # if pkg-config defines the necessary flags, test building some examples
 if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
 	export PKGCONF="pkg-config --define-prefix"
-	for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
+	export LD_LIBRARY_PATH=$(dirname $(find $DESTDIR -name librte_eal.so)):$LD_LIBRARY_PATH
+	examples_to_test=${DPDK_BUILD_TEST_EXAMPLES:-}
+	if [ -z "$examples_to_test" ]; then
+		##################
+		# FIXME examples #
+		##################
+		skipped=""

devtools/test-meson-builds.sh export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH · line 287

Quoted 10 lines
devtools/test-meson-builds.sh +10 -0
+		# Relies on librte_power internal header
+		skipped="$skipped guest_cli vm_power_manager"
+		# Expects libqos
+		skipped="$skipped l2fwd-cat"
+		# performance-thread/{l3fwd-thread,pthread_shim} expect common .mk
+		skipped="$skipped l3fwd-thread pthread_shim"
+		# client_server_mp/{mp_server,mp_client} expect common headers
+		skipped="$skipped mp_client mp_server"
+		# server_node_efd/{node,server} expect common headers
+		skipped="$skipped node server"

The issues with the missing common files for all of above should be fixed by patch [1]

/Bruce

[1] http://patches.dpdk.org/patch/83911/

#13 lore raw

Re: [dpdk-dev] [PATCH 09/10] devtools: compile all examples with pkg-config

Quoted 9 lines · Bruce Richardson

devtools/test-meson-builds.sh export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH · line 287

Quoted 6 lines
devtools/test-meson-builds.sh +6 -0
+             # performance-thread/{l3fwd-thread,pthread_shim} expect common .mk
+             skipped="$skipped l3fwd-thread pthread_shim"
+             # client_server_mp/{mp_server,mp_client} expect common headers
+             skipped="$skipped mp_client mp_server"
+             # server_node_efd/{node,server} expect common headers
+             skipped="$skipped node server"

The issues with the missing common files for all of above should be fixed by patch [1]

I was about to look at this flattening stuff. Thanks for fixing while I was out for the kids :-).

I'll respin once both your patches are in.

Signature · 1 line
David Marchand
#14 lore raw

PATCH 10/10 examples: restore trace point

In reply to David Marchand

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")
---
 examples/cmdline/Makefile                                  | 2 ++
 examples/distributor/Makefile                              | 2 ++
 examples/ethtool/ethtool-app/Makefile                      | 2 ++
 examples/flow_filtering/Makefile                           | 2 ++
 examples/helloworld/Makefile                               | 2 ++
 examples/ioat/Makefile                                     | 2 ++
 examples/ip_reassembly/Makefile                            | 2 ++
 examples/ipv4_multicast/Makefile                           | 2 ++
 examples/l2fwd-cat/Makefile                                | 2 ++
 examples/l2fwd-event/Makefile                              | 2 ++
 examples/l2fwd-jobstats/Makefile                           | 2 ++
 examples/l2fwd-keepalive/Makefile                          | 2 ++
 examples/l2fwd-keepalive/ka-agent/Makefile                 | 2 ++
 examples/l3fwd-acl/Makefile                                | 2 ++
 examples/link_status_interrupt/Makefile                    | 2 ++
 examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++
 examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++
 examples/multi_process/hotplug_mp/Makefile                 | 2 ++
 examples/multi_process/simple_mp/Makefile                  | 2 ++
 examples/multi_process/symmetric_mp/Makefile               | 2 ++
 examples/packet_ordering/Makefile                          | 2 ++
 examples/ptpclient/Makefile                                | 2 ++
 examples/qos_sched/Makefile                                | 2 ++
 examples/server_node_efd/node/Makefile                     | 2 ++
 examples/server_node_efd/server/Makefile                   | 2 ++
 examples/service_cores/Makefile                            | 2 ++
 examples/skeleton/Makefile                                 | 2 ++
 examples/timer/Makefile                                    | 2 ++
 examples/vm_power_manager/Makefile                         | 2 ++
 examples/vm_power_manager/guest_cli/Makefile               | 2 ++
 examples/vmdq/Makefile                                     | 2 ++
 examples/vmdq_dcb/Makefile                                 | 2 ++
 32 files changed, 64 insertions(+)
examples/cmdline/Makefile +2 -0
index d8f51fb39b..09da84ba0b 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/distributor/Makefile +2 -0
index 4116064581..d7615f9a32 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ethtool/ethtool-app/Makefile +2 -0
index 5ebeb200a8..93ef5c27c3 100644
@@ -31,6 +31,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC += $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/flow_filtering/Makefile +2 -0
index 0577e52985..9bc9179346 100644
@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/helloworld/Makefile +2 -0
index 2eef6e4527..436569f5a6 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ioat/Makefile +2 -0
index 9645c27d2f..c13ad8d8af 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ip_reassembly/Makefile +2 -0
index 479b802907..740f4721d0 100644
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ipv4_multicast/Makefile +2 -0
index fb1ebdd433..7ea44e6f63 100644
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-cat/Makefile +2 -0
index c5f82fb548..9ba1135612 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 LDFLAGS += -lpqos
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
examples/l2fwd-event/Makefile +2 -0
index 109b7caa4e..384224b24a 100644
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-jobstats/Makefile +2 -0
index d3ff2d3ee9..fcb60b2a33 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-keepalive/Makefile +2 -0
index c327efab36..09a891149b 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-keepalive/ka-agent/Makefile +2 -0
index 700137c2e2..8b329a78b1 100644
@@ -30,6 +30,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l3fwd-acl/Makefile +2 -0
index eeb6288dae..3420ea3a9c 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/link_status_interrupt/Makefile +2 -0
index b9b02124a4..fa608c56a0 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/client_server_mp/mp_client/Makefile +2 -0
index b723e545b7..bc00a1c875 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/client_server_mp/mp_server/Makefile +2 -0
index f49260a256..d066524b36 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/hotplug_mp/Makefile +2 -0
index 2c023a73d8..3122449d62 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/simple_mp/Makefile +2 -0
index 410f8b5368..d03597c4c2 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/symmetric_mp/Makefile +2 -0
index df69ecabe7..45b7214cba 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/packet_ordering/Makefile +2 -0
index e8d6c57b72..09abda91ea 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ptpclient/Makefile +2 -0
index 86059d8b28..9f56a5e7a0 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/qos_sched/Makefile +2 -0
index 408074a9f5..f42406fe1c 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/server_node_efd/node/Makefile +2 -0
index a4efef42dc..2120de5397 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/server_node_efd/server/Makefile +2 -0
index 106e1abd74..6b5878d8c0 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/service_cores/Makefile +2 -0
index beb7ea0b82..754333c878 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/skeleton/Makefile +2 -0
index ca52abba42..4fa97cb975 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/timer/Makefile +2 -0
index 0f6523afa6..70b1af9f4b 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vm_power_manager/Makefile +2 -0
index 027d17c7ef..8ac1180b2f 100644
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 ifneq ($(shell $(PKGCONF) --atleast-version=0.9.3 libvirt; echo $$?), 0)
 $(error vm_power_manager requires libvirt >= 0.9.3)
 endif
examples/vm_power_manager/guest_cli/Makefile +2 -0
index b84deec574..1ee1ca1017 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vmdq/Makefile +2 -0
index de527281eb..749ed53c6f 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vmdq_dcb/Makefile +2 -0
index 9c9049d85e..1dd42105d6 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#15 lore raw
In reply to David Marchand
Quoted 20 lines · David Marchand

I stepped right into Bruce trap [1] and tested all possible examples. The result is this series.

1: https://patchwork.dpdk.org/patch/82361/

Signature · 13 lines
David Marchand

David Marchand (10):
  examples/fips_validation: fix build with pkg-config
  examples/ipsec-gw: fix build with pkg-config
  examples/kni: fix build with pkg-config
  examples/l2fwd-crypto: fix build with pkg-config
  examples/l3fwd-graph: fix static build
  examples/ntb: fix clean target
  examples/vhost_blk: fix build with pkg-config
  examples/rxtx_callbacks: fix build with pkg-config
  devtools: compile all examples with pkg-config
  examples: restore trace point

Thanks for the work David, this is great. I'll see about doing more cleanup on the skipped list, particularly how we install the examples in the "share" folder, but until then this is great progress.

Series-acked-by: Bruce Richardson <bruce.richardson>

#16 lore raw

v2 cover Examples compilation fixes

In reply to David Marchand

I tested external compilation for all possible examples (in my env). The result is this series.

Signature · 69 lines
David Marchand

Changelog since v1:
- added patch 7 to fix performance-thread example,
- reworked last patch by introducing a new -Dexamples=buildall special
  value and removed exceptions for examples recently fixed in main thanks
  to Bruce,

David Marchand (11):
  examples/fips_validation: fix build with pkg-config
  examples/ipsec-gw: fix build with pkg-config
  examples/kni: fix build with pkg-config
  examples/l2fwd-crypto: fix build with pkg-config
  examples/l3fwd-graph: fix static build
  examples/ntb: fix clean target
  examples/performance-thread: fix build with pkg-config
  examples/vhost_blk: fix build with pkg-config
  examples/rxtx_callbacks: fix build with pkg-config
  examples: restore trace point
  devtools: compile all buildable examples with pkg-config

 devtools/test-meson-builds.sh                 | 11 +++++++--
 examples/cmdline/Makefile                     |  2 ++
 examples/distributor/Makefile                 |  2 ++
 examples/ethtool/ethtool-app/Makefile         |  2 ++
 examples/fips_validation/Makefile             |  2 ++
 examples/flow_filtering/Makefile              |  2 ++
 examples/helloworld/Makefile                  |  2 ++
 examples/ioat/Makefile                        |  2 ++
 examples/ip_reassembly/Makefile               |  2 ++
 examples/ipsec-secgw/Makefile                 |  1 +
 examples/ipv4_multicast/Makefile              |  2 ++
 examples/kni/Makefile                         |  1 +
 examples/l2fwd-cat/Makefile                   |  2 ++
 examples/l2fwd-crypto/Makefile                |  6 +++++
 examples/l2fwd-event/Makefile                 |  2 ++
 examples/l2fwd-jobstats/Makefile              |  2 ++
 examples/l2fwd-keepalive/Makefile             |  2 ++
 examples/l2fwd-keepalive/ka-agent/Makefile    |  2 ++
 examples/l3fwd-acl/Makefile                   |  2 ++
 examples/l3fwd-graph/Makefile                 |  2 +-
 examples/link_status_interrupt/Makefile       |  2 ++
 examples/meson.build                          | 24 +++++++++++++++++--
 .../client_server_mp/mp_client/Makefile       |  2 ++
 .../client_server_mp/mp_server/Makefile       |  2 ++
 examples/multi_process/hotplug_mp/Makefile    |  2 ++
 examples/multi_process/simple_mp/Makefile     |  2 ++
 examples/multi_process/symmetric_mp/Makefile  |  2 ++
 examples/ntb/Makefile                         |  2 +-
 examples/packet_ordering/Makefile             |  2 ++
 .../performance-thread/l3fwd-thread/main.c    |  5 ++++
 examples/ptpclient/Makefile                   |  2 ++
 examples/qos_sched/Makefile                   |  2 ++
 examples/rxtx_callbacks/Makefile              |  2 ++
 examples/server_node_efd/node/Makefile        |  2 ++
 examples/server_node_efd/server/Makefile      |  2 ++
 examples/service_cores/Makefile               |  2 ++
 examples/skeleton/Makefile                    |  2 ++
 examples/timer/Makefile                       |  2 ++
 examples/vhost_blk/vhost_blk.c                |  6 +++++
 examples/vm_power_manager/Makefile            |  2 ++
 examples/vm_power_manager/guest_cli/Makefile  |  2 ++
 examples/vmdq/Makefile                        |  2 ++
 examples/vmdq_dcb/Makefile                    |  2 ++
 meson.build                                   |  2 ++
 44 files changed, 122 insertions(+), 6 deletions(-)

-- 
2.23.0
#17 lore raw

PATCH v2 1/11 examples/fips_validation: fix build with pkg-config

When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated.

Fixes 261bbff75e34 ("examples: use separate crypto session mempools")
---
 examples/fips_validation/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/fips_validation/Makefile +2 -0
index 7ba9bcfea6..8f82a4c6c5 100644
@@ -36,6 +36,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#18 lore raw

PATCH v2 2/11 examples/ipsec-gw: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/ipsec-secgw/Makefile | 1 +
 1 file changed, 1 insertion(+)
examples/ipsec-secgw/Makefile +1 -0
index 5e6cb51eac..7670cc3684 100644
@@ -42,6 +42,7 @@ LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
+CFLAGS += -Wno-address-of-packed-member
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
Acked-by on v2 2/11
#19 lore raw

Re: [dpdk-dev] [EXT] [PATCH v2 02/11] examples/ipsec-gw: fix build with pkg-config

Quoted 26 lines

flow.c: In function ‘parse_flow_tokens’:
flow.c:153:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of- packed-member]
153 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.src_addr,

      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:154:9: error: taking address of packed member of ‘struct rte_ipv4_hdr’
may result in an unaligned pointer value [-Werror=address-of-packed-
member]
  154 |         &rule->ipv4.mask.hdr.src_addr,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

flow.c:170:23: error: taking address of packed member of ‘struct rte_ipv4_hdr’ may result in an unaligned pointer value [-Werror=address-of- packed-member]
170 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.dst_addr,

      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:171:9: error: taking address of packed member of ‘struct rte_ipv4_hdr’
may result in an unaligned pointer value [-Werror=address-of-packed-
member]
  171 |         &rule->ipv4.mask.hdr.dst_addr,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors

Meson build is fine since we waive those warnings. Replicate it for make.

Quoted 6 lines
Fixes 8e693616fcb2 ("examples/ipsec-secgw: enable flow based

distribution")
Cc: [email protected]

#20 lore raw

PATCH v2 3/11 examples/kni: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/kni/Makefile | 1 +
 1 file changed, 1 insertion(+)
examples/kni/Makefile +1 -0
index fa9fa85319..bdc8a2aabe 100644
@@ -24,6 +24,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 CFLAGS += -DALLOW_EXPERIMENTAL_API
+LDFLAGS += -pthread
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
Signature · 1 line
2.23.0
#21 lore raw

PATCH v2 4/11 examples/l2fwd-crypto: fix build with pkg-config

In reply to David Marchand

Two issues fixed here.

First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:
/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status

Fixes e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")
Fixes 261bbff75e34 ("examples: use separate crypto session mempools")
---
 examples/l2fwd-crypto/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/Makefile +6 -0
index 4953ee2b95..211a076699 100644
@@ -24,8 +24,14 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1)
+ifeq ($(NEED_CRYPTO_SCHEDULER), 1)
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#22 lore raw

Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config

Quoted 23 lines · David Marchand

Two issues fixed here.

First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:
/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status

Fixes e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")
Fixes 261bbff75e34 ("examples: use separate crypto session mempools")
---
 examples/l2fwd-crypto/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/Makefile +0 -0
index 4953ee2b95..211a076699 100644

examples/l2fwd-crypto/Makefile PKGCONF ?= pkg-config · line 28

Quoted 5 lines
examples/l2fwd-crypto/Makefile +2 -0
@@ -24,8 +24,14 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1)
+ifeq ($(NEED_CRYPTO_SCHEDULER), 1)

Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:

CONFIG_DEFINES=$(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)

Then we can easily do multiple checks for vars as needed using findstring, e.g.

ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
endif

Whatever approach we use here, I'd like applicable across all makefiles for consistency, and shelling out per-value seems wasteful. Pulling all macro values also allows checks for architecture and instruction set levels too, if so desired.

/Bruce

Quoted 12 lines
examples/l2fwd-crypto/Makefile +4 -0
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#23 lore raw

Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config

Quoted 17 lines · Bruce Richardson

examples/l2fwd-crypto/Makefile PKGCONF ?= pkg-config · line 28

Quoted 2 lines
examples/l2fwd-crypto/Makefile +2 -0
+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1)
+ifeq ($(NEED_CRYPTO_SCHEDULER), 1)

Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:

CONFIG_DEFINES=$(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)

Then we can easily do multiple checks for vars as needed using findstring, e.g.

ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
endif

Quoted 4 lines

Whatever approach we use here, I'd like applicable across all makefiles for consistency, and shelling out per-value seems wasteful. Pulling all macro values also allows checks for architecture and instruction set levels too, if so desired.

I'll have a try..

Signature · 1 line
David Marchand
#24 lore raw

Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config

Quoted 20 lines · David Marchand
Quoted 17 lines · Bruce Richardson

Review

Quoted 2 lines
(quoted diff) +2 -0
+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1)
+ifeq ($(NEED_CRYPTO_SCHEDULER), 1)

Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:

CONFIG_DEFINES=$(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)

Then we can easily do multiple checks for vars as needed using findstring, e.g.

ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
endif

Quoted 4 lines
Quoted 4 lines

Whatever approach we use here, I'd like applicable across all makefiles for consistency, and shelling out per-value seems wasteful. Pulling all macro values also allows checks for architecture and instruction set levels too, if so desired.

examples/l2fwd-crypto/Makefile +6 -0
@@ -23,9 +23,15 @@ PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),)
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
        $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 

I'll send a v3 later.

Signature · 1 line
David Marchand
#25 lore raw

Re: [dpdk-dev] [PATCH v2 04/11] examples/l2fwd-crypto: fix build with pkg-config

Quoted 30 lines · David Marchand
Quoted 24 lines · David Marchand
Quoted 21 lines · Bruce Richardson

Review

Quoted 2 lines
(quoted diff) +2 -0
+NEED_CRYPTO_SCHEDULER = $(shell echo RTE_CRYPTO_SCHEDULER | $(CPP) $(CFLAGS) -P - | tail -1)
+ifeq ($(NEED_CRYPTO_SCHEDULER), 1)

Sorry for the last-minute comment, but I wonder for this check if we can do better by adding into each makefile something like:

CONFIG_DEFINES=$(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)

Then we can easily do multiple checks for vars as needed using findstring, e.g.

ifeq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES),) $(info No crypto scheduler found)
else
...
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.

examples/l2fwd-crypto/Makefile PKGCONF ?= pkg-config · line 32

Quoted 10 lines
examples/l2fwd-crypto/Makefile +4 -0
@@ -23,9 +23,15 @@ PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),)
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 

Can we perhaps keep the existing pkg-config query lines together in the existing block, and just add the extra checks for this particular app afterwards? Having done changes en-mass to the example makefiles a couple of times, it was made a lot easier by having the exact same lines in each as much as possible, allowing changes to be made by applying a single patch-file to each makefile in turn.

#26 lore raw

PATCH v2 5/11 examples/l3fwd-graph: fix static build

In reply to David Marchand

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")
---
 examples/l3fwd-graph/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd-graph/Makefile +1 -1
index 368ac21147..1e4f0600ae 100644
@@ -24,7 +24,7 @@ PKGCONF=pkg-config --define-prefix
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
#27 lore raw

PATCH v2 6/11 examples/ntb: fix clean target

In reply to David Marchand

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")
---
 examples/ntb/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/Makefile +1 -1
index 4675570fd2..d35dabc471 100644
@@ -42,4 +42,4 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
Signature · 1 line
2.23.0
#28 lore raw

PATCH v2 7/11 examples/performance-thread: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/performance-thread/l3fwd-thread/main.c | 5 +++++
 1 file changed, 5 insertions(+)
examples/performance-thread/l3fwd-thread/main.c +5 -0
index 7bf61db6be..4d82fb82ef 100644
@@ -2,6 +2,10 @@
  * Copyright(c) 2010-2016 Intel Corporation
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -12,6 +16,7 @@
 #include <stdarg.h>
 #include <errno.h>
 #include <getopt.h>
+#include <sched.h>
 
 #include <rte_common.h>
 #include <rte_vect.h>
Signature · 1 line
2.23.0
#29 lore raw

PATCH v2 8/11 examples/vhost_blk: fix build with pkg-config

In reply to David Marchand

vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]

  543 |  CPU_ZERO(&cpuset);
      |  ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
  544 |  CPU_SET(0, &cpuset);
      |  ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
  545 |  pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
      |  ^~~~~~~~~~~~~~~~~~~~~~

/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference 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")
---
 examples/vhost_blk/vhost_blk.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/vhost_blk/vhost_blk.c +6 -0
index 8f5d61a589..bb293d492f 100644
@@ -2,6 +2,12 @@
  * Copyright(c) 2010-2019 Intel Corporation
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <pthread.h>
+#include <sched.h>
+
 #include <stdint.h>
 #include <unistd.h>
 #include <stdbool.h>
Signature · 1 line
2.23.0
Reviewed-by on v2 8/11
#30 lore raw

Re: [dpdk-dev] [PATCH v2 08/11] examples/vhost_blk: fix build with pkg-config

Quoted 39 lines · David Marchand

vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]

  543 |  CPU_ZERO(&cpuset);
      |  ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
  544 |  CPU_SET(0, &cpuset);
      |  ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
  545 |  pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
      |  ^~~~~~~~~~~~~~~~~~~~~~

/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference 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")
---
 examples/vhost_blk/vhost_blk.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/vhost_blk/vhost_blk.c +0 -0
index 8f5d61a589..bb293d492f 100644
@@ -2,6 +2,12 @@
  * Copyright(c) 2010-2019 Intel Corporation
  */

examples/vhost_blk/vhost_blk.c line 13

Quoted 10 lines
examples/vhost_blk/vhost_blk.c +6 -0
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <pthread.h>
+#include <sched.h>
+
 #include <stdint.h>
 #include <unistd.h>
 #include <stdbool.h>
#31 lore raw

PATCH v2 9/11 examples/rxtx_callbacks: fix build with pkg-config

In reply to David Marchand

This example is missing the experimental flag since it uses an experimental API.

Fixes cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp")
---
 examples/rxtx_callbacks/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/rxtx_callbacks/Makefile +2 -0
index bac3015d34..a618cdf751 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#32 lore raw

PATCH v2 10/11 examples: restore trace point

In reply to David Marchand

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")
---
 examples/cmdline/Makefile                                  | 2 ++
 examples/distributor/Makefile                              | 2 ++
 examples/ethtool/ethtool-app/Makefile                      | 2 ++
 examples/flow_filtering/Makefile                           | 2 ++
 examples/helloworld/Makefile                               | 2 ++
 examples/ioat/Makefile                                     | 2 ++
 examples/ip_reassembly/Makefile                            | 2 ++
 examples/ipv4_multicast/Makefile                           | 2 ++
 examples/l2fwd-cat/Makefile                                | 2 ++
 examples/l2fwd-event/Makefile                              | 2 ++
 examples/l2fwd-jobstats/Makefile                           | 2 ++
 examples/l2fwd-keepalive/Makefile                          | 2 ++
 examples/l2fwd-keepalive/ka-agent/Makefile                 | 2 ++
 examples/l3fwd-acl/Makefile                                | 2 ++
 examples/link_status_interrupt/Makefile                    | 2 ++
 examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++
 examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++
 examples/multi_process/hotplug_mp/Makefile                 | 2 ++
 examples/multi_process/simple_mp/Makefile                  | 2 ++
 examples/multi_process/symmetric_mp/Makefile               | 2 ++
 examples/packet_ordering/Makefile                          | 2 ++
 examples/ptpclient/Makefile                                | 2 ++
 examples/qos_sched/Makefile                                | 2 ++
 examples/server_node_efd/node/Makefile                     | 2 ++
 examples/server_node_efd/server/Makefile                   | 2 ++
 examples/service_cores/Makefile                            | 2 ++
 examples/skeleton/Makefile                                 | 2 ++
 examples/timer/Makefile                                    | 2 ++
 examples/vm_power_manager/Makefile                         | 2 ++
 examples/vm_power_manager/guest_cli/Makefile               | 2 ++
 examples/vmdq/Makefile                                     | 2 ++
 examples/vmdq_dcb/Makefile                                 | 2 ++
 32 files changed, 64 insertions(+)
examples/cmdline/Makefile +2 -0
index d8f51fb39b..09da84ba0b 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/distributor/Makefile +2 -0
index 4116064581..d7615f9a32 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ethtool/ethtool-app/Makefile +2 -0
index 5ebeb200a8..93ef5c27c3 100644
@@ -31,6 +31,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC += $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/flow_filtering/Makefile +2 -0
index 0577e52985..9bc9179346 100644
@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/helloworld/Makefile +2 -0
index 2eef6e4527..436569f5a6 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ioat/Makefile +2 -0
index 9645c27d2f..c13ad8d8af 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ip_reassembly/Makefile +2 -0
index 479b802907..740f4721d0 100644
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ipv4_multicast/Makefile +2 -0
index fb1ebdd433..7ea44e6f63 100644
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-cat/Makefile +2 -0
index c5f82fb548..9ba1135612 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 LDFLAGS += -lpqos
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
examples/l2fwd-event/Makefile +2 -0
index 109b7caa4e..384224b24a 100644
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-jobstats/Makefile +2 -0
index d3ff2d3ee9..fcb60b2a33 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-keepalive/Makefile +2 -0
index c327efab36..09a891149b 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-keepalive/ka-agent/Makefile +2 -0
index 700137c2e2..8b329a78b1 100644
@@ -30,6 +30,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l3fwd-acl/Makefile +2 -0
index eeb6288dae..3420ea3a9c 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/link_status_interrupt/Makefile +2 -0
index b9b02124a4..fa608c56a0 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/client_server_mp/mp_client/Makefile +2 -0
index b723e545b7..bc00a1c875 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/client_server_mp/mp_server/Makefile +2 -0
index f49260a256..d066524b36 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/hotplug_mp/Makefile +2 -0
index 2c023a73d8..3122449d62 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/simple_mp/Makefile +2 -0
index 410f8b5368..d03597c4c2 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/symmetric_mp/Makefile +2 -0
index df69ecabe7..45b7214cba 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/packet_ordering/Makefile +2 -0
index e8d6c57b72..09abda91ea 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ptpclient/Makefile +2 -0
index 86059d8b28..9f56a5e7a0 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/qos_sched/Makefile +2 -0
index 408074a9f5..f42406fe1c 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/server_node_efd/node/Makefile +2 -0
index a4efef42dc..2120de5397 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/server_node_efd/server/Makefile +2 -0
index 106e1abd74..6b5878d8c0 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/service_cores/Makefile +2 -0
index beb7ea0b82..754333c878 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/skeleton/Makefile +2 -0
index ca52abba42..4fa97cb975 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/timer/Makefile +2 -0
index 0f6523afa6..70b1af9f4b 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vm_power_manager/Makefile +2 -0
index 027d17c7ef..8ac1180b2f 100644
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 ifneq ($(shell $(PKGCONF) --atleast-version=0.9.3 libvirt; echo $$?), 0)
 $(error vm_power_manager requires libvirt >= 0.9.3)
 endif
examples/vm_power_manager/guest_cli/Makefile +2 -0
index b84deec574..1ee1ca1017 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vmdq/Makefile +2 -0
index de527281eb..749ed53c6f 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vmdq_dcb/Makefile +2 -0
index 9c9049d85e..1dd42105d6 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#33 lore raw

PATCH v2 11/11 devtools: compile all buildable examples with pkg-config

In reply to David Marchand

Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.

Select only buildable examples and test their compilation for the x86-default target.

Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:

$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \
  -Dexamples=buildable

---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is for vm_power_manager which is broken,

---
 devtools/test-meson-builds.sh | 11 +++++++++--
 examples/meson.build          | 24 ++++++++++++++++++++++--
 meson.build                   |  2 ++
 3 files changed, 33 insertions(+), 4 deletions(-)
devtools/test-meson-builds.sh +9 -2
index 3ce49368cf..a04f3eb7ff 100755
@@ -213,7 +213,8 @@ default_machine='nehalem'
 if ! check_cc_flags "-march=$default_machine" ; then
 	default_machine='corei7'
 fi
-build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine $use_shared
+build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine \
+	-Dexamples=buildable $use_shared
 
 # 32-bit with default compiler
 if check_cc_flags '-m32' ; then
@@ -266,10 +267,16 @@ pc_file=$(find $DESTDIR -name libdpdk.pc)
 export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
 libdir=$(dirname $(find $DESTDIR -name librte_eal.so))
 export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
-examples=${DPDK_BUILD_TEST_EXAMPLES:-"cmdline helloworld l2fwd l3fwd skeleton timer"}
 # if pkg-config defines the necessary flags, test building some examples
 if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
 	export PKGCONF="pkg-config --define-prefix"
+	examples=${DPDK_BUILD_TEST_EXAMPLES:-}
+	if [ -z "$examples" ]; then
+		for mk in $DESTDIR/usr/local/share/dpdk/examples/*/Makefile; do
+			name=$(basename $(dirname $mk))
+			examples="$examples $name"
+		done
+	fi
 	for example in $examples; do
 		echo "## Building $example"
 		$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example \
examples/meson.build +22 -2
index 46ec80919e..a23ab79e8c 100644
@@ -55,9 +55,18 @@ endif
 if get_option('examples').to_lower() == 'all'
 	examples = all_examples
 	allow_skips = true # don't flag an error if we can't build an app
+	install_buildable = false
+elif get_option('examples').to_lower() == 'buildable'
+	examples = all_examples
+	allow_skips = true
+	install_buildable = true # only install examples that can be built
+	# FIXME: vm_power_manager relies on an internal header and can't build
+	# outside dpdk tree.
+	dpdk_examples_exclude += ['vm_power_manager']
 else
 	examples = get_option('examples').split(',')
 	allow_skips = false # error out if we can't build a requested app
+	install_buildable = false
 endif
 default_cflags = machine_args
 if cc.has_argument('-Wno-format-truncation')
@@ -81,10 +90,15 @@ foreach example: examples
 		foreach d:deps
 			var_name = get_option('default_library') + '_rte_' + d
 			if not is_variable(var_name)
-				error('Missing dependency "@0@" for example "@1@"'.format(d, name))
+				message('Missing dependency "@0@" for example "@1@"'.format(d, name))
+				build = false
+			else
+				dep_objs += [get_variable(var_name)]
 			endif
-			dep_objs += [get_variable(var_name)]
 		endforeach
+	endif
+
+	if build
 		if allow_experimental_apis
 			cflags += '-DALLOW_EXPERIMENTAL_API'
 		endif
@@ -98,5 +112,11 @@ foreach example: examples
 		error('Cannot build requested example "' + name + '"')
 	else
 		message('Skipping example "' + name + '"')
+		if install_buildable
+			# exclude based on top-level directory only
+			dir = example.split('/')[0]
+			dpdk_examples_exclude += dir
+			message('Excluding example directory "@0@" from install'.format(dir))
+		endif
 	endif
 endforeach
meson.build +2 -0
index 45d974cd2c..559a9d2f1b 100644
@@ -58,9 +58,11 @@ subdir('doc')
 
 # build any examples explicitly requested - useful for developers - and
 # install any example code into the appropriate install path
+dpdk_examples_exclude = []
 subdir('examples')
 install_subdir('examples',
 	install_dir: get_option('datadir') + '/dpdk',
+	exclude_directories: dpdk_examples_exclude,
 	exclude_files: 'meson.build')
 
 # build kernel modules if enabled
Signature · 1 line
2.23.0
#34 lore raw

Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config

Thomas,

Quoted 2 lines · David Marchand

- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,

If next-virtio is not pulled yet, we can add a temp:
dpdk_examples_exclude += ['vhost']

Signature · 1 line
David Marchand
#35 lore raw

Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config

In reply to David Marchand
Quoted 31 lines · David Marchand

Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.

Select only buildable examples and test their compilation for the x86-default target.

Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:

$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \
  -Dexamples=buildable

---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is for vm_power_manager which is broken,

Quoted 1 line

---

I'm not sure my "suggested-by" should be on this, since the idea of adding an extra buildable option is not mine here. I actually think I prefer the previous approach based on your original suggestion of always skipping unbuildable examples. Two reasons for that:
* I'm not fully sure of the value of installing examples that can't be built, which was the original issue you raised.
* I don't like mixing together two separate things - examples to build, and examples to install in a single option.

Therefore, I think we should choose one of two less confusing paths - either lets just always install all applications, or let's always install only those apps which can be built. I'm not massively concerned either way which is chosen, but I don't think we should try and support both and overload options to do so.

/Bruce

#36 lore raw

Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config

Quoted 33 lines · Bruce Richardson
Quoted 31 lines · David Marchand

Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.

Select only buildable examples and test their compilation for the x86-default target.

Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:

$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \
  -Dexamples=buildable

---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is for vm_power_manager which is broken,

Quoted 2 lines
Quoted 1 line

---

I'm not sure my "suggested-by" should be on this, since the idea of adding

I was not sure how to credit my copying of the meson bits :-).

Quoted 5 lines

an extra buildable option is not mine here. I actually think I prefer the previous approach based on your original suggestion of always skipping unbuildable examples. Two reasons for that:
* I'm not fully sure of the value of installing examples that can't be built, which was the original issue you raised.

Thomas objected that all examples have always been provided regardless of the configuration.
The examples serve as documentation and the API/guides documentations are all compiled anyway.

Quoted 2 lines

* I don't like mixing together two separate things - examples to build, and examples to install in a single option.

Yes, I am not entirely happy either.
Time is ticking, I'll just drop this patch for 20.11.

Signature · 1 line
David Marchand
#37 lore raw

Re: [dpdk-dev] [PATCH v2 11/11] devtools: compile all buildable examples with pkg-config

Quoted 47 lines · David Marchand
Quoted 33 lines · Bruce Richardson
Quoted 31 lines · David Marchand

Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system.
Introduce a new "buildable" special value for the -Dexamples= meson option, this way existing behavior on installing all examples is preserved.

Select only buildable examples and test their compilation for the x86-default target.

Note for maintainers/users of the script: for existing environments, the x86-default target might get broken by this patch since the script now tries to build all "installed" examples and dependencies for some might be unfulfilled.
To fix this temporary situation, you can either delete the whole directory or reconfigure it:

$ meson configure $DPDK_BUILD_TEST_DIR/build-x86-default \
  -Dexamples=buildable

---
Changelog since v1:
- rebased on main,
- introduced a new "buildable" special value for the -Dexamples option,
- installation of the "multi-level" examples has been fixed, so corresponding exceptions have been removed,
- a fix for the vhost is waiting in next-virtio, I assume it will get pulled before this series,
- the only remaining exception is for vm_power_manager which is broken,

Quoted 2 lines
Quoted 1 line

---

I'm not sure my "suggested-by" should be on this, since the idea of adding

I was not sure how to credit my copying of the meson bits :-).

Quoted 5 lines

an extra buildable option is not mine here. I actually think I prefer the previous approach based on your original suggestion of always skipping unbuildable examples. Two reasons for that:
* I'm not fully sure of the value of installing examples that can't be built, which was the original issue you raised.

Quoted 5 lines

Thomas objected that all examples have always been provided regardless of the configuration.
The examples serve as documentation and the API/guides documentations are all compiled anyway.

Since we are looking to start adding in checks for features into the example makefiles, I'd go with continuing the policy of just shipping them all [1]. Over time we can update the makefiles to start adding proper build error messages with explanations in cases where examples are missing dependencies.

/Bruce

[1] http://patches.dpdk.org/patch/83911/

#38 lore raw

v3 cover Examples compilation fixes

In reply to David Marchand

I tested external compilation for all possible examples (in my env). The result is this series.

Signature · 71 lines
David Marchand

Changelog since v2:
- reworked patch 4 check on crypto driver availability,
- added patch 5 to fix misalignment with other examples makefiles,
- dropped last patch on checking all examples,
Changelog since v1:
- added patch 7 to fix performance-thread example,
- reworked last patch by introducing a new -Dexamples=buildall special
  value and removed exceptions for examples recently fixed in main thanks
  to Bruce,

David Marchand (11):
  examples/fips_validation: fix build with pkg-config
  examples/ipsec-gw: fix build with pkg-config
  examples/kni: fix build with pkg-config
  examples/l2fwd-crypto: fix build with pkg-config
  examples/l3fwd-graph: fix static build
  examples/l3fwd-graph: fix pkg-config usage
  examples/ntb: fix clean target
  examples/performance-thread: fix build with pkg-config
  examples/vhost_blk: fix build with pkg-config
  examples/rxtx_callbacks: fix build with pkg-config
  examples: restore trace point

 examples/cmdline/Makefile                                  | 2 ++
 examples/distributor/Makefile                              | 2 ++
 examples/ethtool/ethtool-app/Makefile                      | 2 ++
 examples/eventdev_pipeline/Makefile                        | 2 ++
 examples/fips_validation/Makefile                          | 2 ++
 examples/flow_filtering/Makefile                           | 2 ++
 examples/helloworld/Makefile                               | 2 ++
 examples/ioat/Makefile                                     | 2 ++
 examples/ip_reassembly/Makefile                            | 2 ++
 examples/ipsec-secgw/Makefile                              | 1 +
 examples/ipv4_multicast/Makefile                           | 2 ++
 examples/kni/Makefile                                      | 2 ++
 examples/l2fwd-cat/Makefile                                | 2 ++
 examples/l2fwd-crypto/Makefile                             | 6 ++++++
 examples/l2fwd-event/Makefile                              | 2 ++
 examples/l2fwd-jobstats/Makefile                           | 2 ++
 examples/l2fwd-keepalive/Makefile                          | 2 ++
 examples/l2fwd-keepalive/ka-agent/Makefile                 | 2 ++
 examples/l3fwd-acl/Makefile                                | 2 ++
 examples/l3fwd-graph/Makefile                              | 6 +++---
 examples/link_status_interrupt/Makefile                    | 2 ++
 examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++
 examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++
 examples/multi_process/hotplug_mp/Makefile                 | 2 ++
 examples/multi_process/simple_mp/Makefile                  | 2 ++
 examples/multi_process/symmetric_mp/Makefile               | 2 ++
 examples/ntb/Makefile                                      | 2 +-
 examples/packet_ordering/Makefile                          | 2 ++
 examples/performance-thread/l3fwd-thread/main.c            | 5 +++++
 examples/ptpclient/Makefile                                | 2 ++
 examples/qos_sched/Makefile                                | 2 ++
 examples/rxtx_callbacks/Makefile                           | 2 ++
 examples/server_node_efd/node/Makefile                     | 2 ++
 examples/server_node_efd/server/Makefile                   | 2 ++
 examples/service_cores/Makefile                            | 2 ++
 examples/skeleton/Makefile                                 | 2 ++
 examples/timer/Makefile                                    | 2 ++
 examples/vhost_blk/vhost_blk.c                             | 6 ++++++
 examples/vm_power_manager/Makefile                         | 2 ++
 examples/vm_power_manager/guest_cli/Makefile               | 2 ++
 examples/vmdq/Makefile                                     | 2 ++
 examples/vmdq_dcb/Makefile                                 | 2 ++
 42 files changed, 94 insertions(+), 4 deletions(-)

-- 
2.23.0
#39 lore raw

PATCH v3 1/11 examples/fips_validation: fix build with pkg-config

When this example started using rte_cryptodev_sym_session_pool_create, the part for pkg-config builds was not updated.

Fixes 261bbff75e34 ("examples: use separate crypto session mempools")
---
 examples/fips_validation/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/fips_validation/Makefile +2 -0
index 7ba9bcfea6..8f82a4c6c5 100644
@@ -36,6 +36,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#40 lore raw

PATCH v3 2/11 examples/ipsec-gw: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/ipsec-secgw/Makefile | 1 +
 1 file changed, 1 insertion(+)
examples/ipsec-secgw/Makefile +1 -0
index 5e6cb51eac..7670cc3684 100644
@@ -42,6 +42,7 @@ LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
+CFLAGS += -Wno-address-of-packed-member
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
#41 lore raw

PATCH v3 3/11 examples/kni: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/kni/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/kni/Makefile +2 -0
index fa9fa85319..bbf3bcae12 100644
@@ -27,6 +27,8 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+LDFLAGS += -pthread
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#42 lore raw

PATCH v3 4/11 examples/l2fwd-crypto: fix build with pkg-config

In reply to David Marchand

Two issues fixed here.

First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:
/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to `rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status

Fixes e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")
Fixes 261bbff75e34 ("examples: use separate crypto session mempools")

---
Changelog since v2:
- reworked config check,

---
 examples/l2fwd-crypto/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
examples/l2fwd-crypto/Makefile +6 -0
index 4953ee2b95..7731eccd03 100644
@@ -26,6 +26,12 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)
+ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),)
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#43 lore raw

PATCH v3 5/11 examples/l3fwd-graph: fix static build

In reply to David Marchand

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")
---
 examples/l3fwd-graph/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd-graph/Makefile +1 -1
index 368ac21147..1e4f0600ae 100644
@@ -24,7 +24,7 @@ PKGCONF=pkg-config --define-prefix
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.23.0
#44 lore raw

PATCH v3 6/11 examples/l3fwd-graph: fix pkg-config usage

In reply to David Marchand

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")
---
 examples/l3fwd-graph/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
examples/l3fwd-graph/Makefile +2 -2
index 1e4f0600ae..6e3d0bca06 100644
@@ -19,9 +19,9 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
-PC_FILE := $(shell $(PKGCONF) --path libdpdk)
+PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
Signature · 1 line
2.23.0
#45 lore raw

PATCH v3 7/11 examples/ntb: fix clean target

In reply to David Marchand

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")
---
 examples/ntb/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/Makefile +1 -1
index 4675570fd2..d35dabc471 100644
@@ -42,4 +42,4 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
Signature · 1 line
2.23.0
#46 lore raw

PATCH v3 8/11 examples/performance-thread: fix build with pkg-config

In reply to David Marchand

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")
---
 examples/performance-thread/l3fwd-thread/main.c | 5 +++++
 1 file changed, 5 insertions(+)
examples/performance-thread/l3fwd-thread/main.c +5 -0
index 7bf61db6be..4d82fb82ef 100644
@@ -2,6 +2,10 @@
  * Copyright(c) 2010-2016 Intel Corporation
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -12,6 +16,7 @@
 #include <stdarg.h>
 #include <errno.h>
 #include <getopt.h>
+#include <sched.h>
 
 #include <rte_common.h>
 #include <rte_vect.h>
Signature · 1 line
2.23.0
#47 lore raw

PATCH v3 9/11 examples/vhost_blk: fix build with pkg-config

In reply to David Marchand

vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]

  543 |  CPU_ZERO(&cpuset);
      |  ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
  544 |  CPU_SET(0, &cpuset);
      |  ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
  545 |  pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
      |  ^~~~~~~~~~~~~~~~~~~~~~

/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference 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")
---
 examples/vhost_blk/vhost_blk.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/vhost_blk/vhost_blk.c +6 -0
index 8f5d61a589..bb293d492f 100644
@@ -2,6 +2,12 @@
  * Copyright(c) 2010-2019 Intel Corporation
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <pthread.h>
+#include <sched.h>
+
 #include <stdint.h>
 #include <unistd.h>
 #include <stdbool.h>
Signature · 1 line
2.23.0
#48 lore raw

PATCH v3 10/11 examples/rxtx_callbacks: fix build with pkg-config

In reply to David Marchand

This example is missing the experimental flag since it uses an experimental API.

Fixes cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp")
---
 examples/rxtx_callbacks/Makefile | 2 ++
 1 file changed, 2 insertions(+)
examples/rxtx_callbacks/Makefile +2 -0
index bac3015d34..a618cdf751 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#49 lore raw

PATCH v3 11/11 examples: restore trace point

In reply to David Marchand

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")

---
Changelog since v2:
- added eventdev_pipeline,

---
 examples/cmdline/Makefile                                  | 2 ++
 examples/distributor/Makefile                              | 2 ++
 examples/ethtool/ethtool-app/Makefile                      | 2 ++
 examples/eventdev_pipeline/Makefile                        | 2 ++
 examples/flow_filtering/Makefile                           | 2 ++
 examples/helloworld/Makefile                               | 2 ++
 examples/ioat/Makefile                                     | 2 ++
 examples/ip_reassembly/Makefile                            | 2 ++
 examples/ipv4_multicast/Makefile                           | 2 ++
 examples/l2fwd-cat/Makefile                                | 2 ++
 examples/l2fwd-event/Makefile                              | 2 ++
 examples/l2fwd-jobstats/Makefile                           | 2 ++
 examples/l2fwd-keepalive/Makefile                          | 2 ++
 examples/l2fwd-keepalive/ka-agent/Makefile                 | 2 ++
 examples/l3fwd-acl/Makefile                                | 2 ++
 examples/link_status_interrupt/Makefile                    | 2 ++
 examples/multi_process/client_server_mp/mp_client/Makefile | 2 ++
 examples/multi_process/client_server_mp/mp_server/Makefile | 2 ++
 examples/multi_process/hotplug_mp/Makefile                 | 2 ++
 examples/multi_process/simple_mp/Makefile                  | 2 ++
 examples/multi_process/symmetric_mp/Makefile               | 2 ++
 examples/packet_ordering/Makefile                          | 2 ++
 examples/ptpclient/Makefile                                | 2 ++
 examples/qos_sched/Makefile                                | 2 ++
 examples/server_node_efd/node/Makefile                     | 2 ++
 examples/server_node_efd/server/Makefile                   | 2 ++
 examples/service_cores/Makefile                            | 2 ++
 examples/skeleton/Makefile                                 | 2 ++
 examples/timer/Makefile                                    | 2 ++
 examples/vm_power_manager/Makefile                         | 2 ++
 examples/vm_power_manager/guest_cli/Makefile               | 2 ++
 examples/vmdq/Makefile                                     | 2 ++
 examples/vmdq_dcb/Makefile                                 | 2 ++
 33 files changed, 66 insertions(+)
examples/cmdline/Makefile +2 -0
index d8f51fb39b..09da84ba0b 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/distributor/Makefile +2 -0
index 4116064581..d7615f9a32 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ethtool/ethtool-app/Makefile +2 -0
index 5ebeb200a8..93ef5c27c3 100644
@@ -31,6 +31,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC += $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/eventdev_pipeline/Makefile +2 -0
index 05c6f865ad..f5072a2b0c 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/flow_filtering/Makefile +2 -0
index 0577e52985..9bc9179346 100644
@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/helloworld/Makefile +2 -0
index 2eef6e4527..436569f5a6 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ioat/Makefile +2 -0
index 9645c27d2f..c13ad8d8af 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ip_reassembly/Makefile +2 -0
index 479b802907..740f4721d0 100644
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ipv4_multicast/Makefile +2 -0
index fb1ebdd433..7ea44e6f63 100644
@@ -27,6 +27,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-cat/Makefile +2 -0
index c5f82fb548..9ba1135612 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 LDFLAGS += -lpqos
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
examples/l2fwd-event/Makefile +2 -0
index 109b7caa4e..384224b24a 100644
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-jobstats/Makefile +2 -0
index d3ff2d3ee9..fcb60b2a33 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-keepalive/Makefile +2 -0
index c327efab36..09a891149b 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l2fwd-keepalive/ka-agent/Makefile +2 -0
index 700137c2e2..8b329a78b1 100644
@@ -30,6 +30,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/l3fwd-acl/Makefile +2 -0
index eeb6288dae..3420ea3a9c 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/link_status_interrupt/Makefile +2 -0
index b9b02124a4..fa608c56a0 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/client_server_mp/mp_client/Makefile +2 -0
index b723e545b7..bc00a1c875 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/client_server_mp/mp_server/Makefile +2 -0
index f49260a256..d066524b36 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/hotplug_mp/Makefile +2 -0
index 2c023a73d8..3122449d62 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/simple_mp/Makefile +2 -0
index 410f8b5368..d03597c4c2 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/multi_process/symmetric_mp/Makefile +2 -0
index df69ecabe7..45b7214cba 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/packet_ordering/Makefile +2 -0
index e8d6c57b72..09abda91ea 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/ptpclient/Makefile +2 -0
index 86059d8b28..9f56a5e7a0 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/qos_sched/Makefile +2 -0
index 408074a9f5..f42406fe1c 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/server_node_efd/node/Makefile +2 -0
index a4efef42dc..2120de5397 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/server_node_efd/server/Makefile +2 -0
index 106e1abd74..6b5878d8c0 100644
@@ -28,6 +28,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/service_cores/Makefile +2 -0
index beb7ea0b82..754333c878 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/skeleton/Makefile +2 -0
index ca52abba42..4fa97cb975 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/timer/Makefile +2 -0
index 0f6523afa6..70b1af9f4b 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vm_power_manager/Makefile +2 -0
index 027d17c7ef..8ac1180b2f 100644
@@ -32,6 +32,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 ifneq ($(shell $(PKGCONF) --atleast-version=0.9.3 libvirt; echo $$?), 0)
 $(error vm_power_manager requires libvirt >= 0.9.3)
 endif
examples/vm_power_manager/guest_cli/Makefile +2 -0
index b84deec574..1ee1ca1017 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vmdq/Makefile +2 -0
index de527281eb..749ed53c6f 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
examples/vmdq_dcb/Makefile +2 -0
index 9c9049d85e..1dd42105d6 100644
@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
Signature · 1 line
2.23.0
#50 lore raw
In reply to David Marchand

14/11/2020 10:05, David Marchand:

Quoted 15 lines

I tested external compilation for all possible examples (in my env). The result is this series.

David Marchand (11):
examples/fips_validation: fix build with pkg-config examples/ipsec-gw: fix build with pkg-config examples/kni: fix build with pkg-config examples/l2fwd-crypto: fix build with pkg-config examples/l3fwd-graph: fix static build examples/l3fwd-graph: fix pkg-config usage examples/ntb: fix clean target examples/performance-thread: fix build with pkg-config examples/vhost_blk: fix build with pkg-config examples/rxtx_callbacks: fix build with pkg-config
examples: restore trace point

I think all patches are candidates for backport. I've decided to add Cc: [email protected] where is was not.

Applied, thanks