[dpdk-dev] [PATCH] app/pdump: fix pdump can't find the driver when compiled dpdk to shared libraries

zhaozhanxu zhaozhanxu at 163.com
Fri Mar 3 10:27:50 CET 2017


When I compiled dpdk With configuration "CONFIG_RTE_BUILD_SHARED_LIB=y",
I get error message "EAL: no driver found for net_pcap_rx_0" and
"EAL: Driver cannot attach the device (net_pcap_rx_0)" by running pdump.
So I add library librte_pmd_pcap.so.

Signed-off-by: zhaozhanxu <zhaozhanxu at 163.com>
---
 app/pdump/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/pdump/Makefile b/app/pdump/Makefile
index 536198f..49c7ac4 100644
--- a/app/pdump/Makefile
+++ b/app/pdump/Makefile
@@ -41,6 +41,10 @@ CFLAGS += $(WERROR_FLAGS)
 
 SRCS-y := main.c
 
+ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
+	_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap
+endif
+
 # this application needs libraries first
 DEPDIRS-y += lib
 
-- 
2.7.4




More information about the dev mailing list