From: David Marchand Date: Sat, 14 Nov 2020 09:05:26 +0000 (+0100) Subject: examples/l2fwd-crypto: fix build with pkg-config X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bcd3004381b09adaa1ab7ceb9c0592e640fb210c;p=dpdk.git examples/l2fwd-crypto: fix build with pkg-config 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") Cc: stable@dpdk.org Signed-off-by: David Marchand --- diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 4953ee2b95..7731eccd03 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -26,6 +26,12 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API +CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null) +ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),) +LDFLAGS_SHARED += -lrte_crypto_scheduler +endif + build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)