DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/pdump: fix pdump can't find the driver when compiled dpdk to shared libraries
@ 2017-03-03  9:27 zhaozhanxu
  2017-03-10 12:56 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: zhaozhanxu @ 2017-03-03  9:27 UTC (permalink / raw)
  To: dev; +Cc: zhaozhanxu

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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/pdump: fix pdump can't find the driver when compiled dpdk to shared libraries
  2017-03-03  9:27 [dpdk-dev] [PATCH] app/pdump: fix pdump can't find the driver when compiled dpdk to shared libraries zhaozhanxu
@ 2017-03-10 12:56 ` Thomas Monjalon
  2017-03-24 13:15   ` Pattan, Reshma
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2017-03-10 12:56 UTC (permalink / raw)
  To: zhaozhanxu; +Cc: dev

2017-03-03 17:27, zhaozhanxu:
> 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.
[...]
> +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> +	_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap
> +endif

The idea of having drivers as shared libraries is to use them as plugins.
We are not going to link the applications with every drivers.
Instead we load them explicitly with -d option.

Someone should document it in
http://dpdk.org/doc/guides/linux_gsg/build_sample_apps.html#running-a-sample-application
Any volunteer?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/pdump: fix pdump can't find the driver when compiled dpdk to shared libraries
  2017-03-10 12:56 ` Thomas Monjalon
@ 2017-03-24 13:15   ` Pattan, Reshma
  0 siblings, 0 replies; 3+ messages in thread
From: Pattan, Reshma @ 2017-03-24 13:15 UTC (permalink / raw)
  To: Thomas Monjalon, zhaozhanxu; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Friday, March 10, 2017 12:56 PM
> To: zhaozhanxu <zhaozhanxu@163.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] app/pdump: fix pdump can't find the driver
> when compiled dpdk to shared libraries
> 
> 2017-03-03 17:27, zhaozhanxu:
> > 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.
> [...]
> > +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> > +	_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap endif
> 
> The idea of having drivers as shared libraries is to use them as plugins.
> We are not going to link the applications with every drivers.
> Instead we load them explicitly with -d option.
> 
> Someone should document it in
> http://dpdk.org/doc/guides/linux_gsg/build_sample_apps.html#running-a-
> sample-application
> Any volunteer?

I will update the doc.

Thanks,
Reshma

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-24 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03  9:27 [dpdk-dev] [PATCH] app/pdump: fix pdump can't find the driver when compiled dpdk to shared libraries zhaozhanxu
2017-03-10 12:56 ` Thomas Monjalon
2017-03-24 13:15   ` Pattan, Reshma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).