Skip to content

Commit

Permalink
examples/l2fwd-crypto: fix build with pkg-config
Browse files Browse the repository at this point in the history
[ upstream commit bcd3004 ]

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: e3bcb99 ("examples/l2fwd-crypto: limit number of sessions")
Fixes: 261bbff ("examples: use separate crypto session mempools")

Signed-off-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
david-marchand authored and bluca committed Nov 16, 2020
1 parent 8a08b39 commit 763e52f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/l2fwd-crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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)

Expand Down

0 comments on commit 763e52f

Please sign in to comment.