DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
@ 2017-11-17 16:19 Timothy Redaelli
  2017-11-17 16:43 ` Luca Boccassi
  2017-11-20 10:27 ` Eelco Chaudron
  0 siblings, 2 replies; 6+ messages in thread
From: Timothy Redaelli @ 2017-11-17 16:19 UTC (permalink / raw)
  To: dev; +Cc: Jingjing Wu

testpmd is often used inside a VM to test the OVS PVP scenario.
This commit makes testpmd to link to virtio PMD when DPDK is built as
shared libraries too.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 app/test-pmd/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index 4993c9184..ffc370f0e 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -87,6 +87,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC),y)
 LDLIBS += -lrte_pmd_softnic
 endif
 
+ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
+LDLIBS += -lrte_pmd_virtio
+endif
+
 endif
 
 CFLAGS_cmdline.o := -D_GNU_SOURCE
-- 
2.14.3

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

* Re: [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
  2017-11-17 16:19 [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries Timothy Redaelli
@ 2017-11-17 16:43 ` Luca Boccassi
  2017-11-20 10:27 ` Eelco Chaudron
  1 sibling, 0 replies; 6+ messages in thread
From: Luca Boccassi @ 2017-11-17 16:43 UTC (permalink / raw)
  To: Timothy Redaelli, dev; +Cc: Jingjing Wu

On Fri, 2017-11-17 at 17:19 +0100, Timothy Redaelli wrote:
> testpmd is often used inside a VM to test the OVS PVP scenario.
> This commit makes testpmd to link to virtio PMD when DPDK is built as
> shared libraries too.
> 
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  app/test-pmd/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
> index 4993c9184..ffc370f0e 100644
> --- a/app/test-pmd/Makefile
> +++ b/app/test-pmd/Makefile
> @@ -87,6 +87,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC),y)
>  LDLIBS += -lrte_pmd_softnic
>  endif
>  
> +ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
> +LDLIBS += -lrte_pmd_virtio
> +endif
> +
>  endif
>  
>  CFLAGS_cmdline.o := -D_GNU_SOURCE

Acked-by: <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
  2017-11-17 16:19 [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries Timothy Redaelli
  2017-11-17 16:43 ` Luca Boccassi
@ 2017-11-20 10:27 ` Eelco Chaudron
  2017-11-29 22:23   ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Eelco Chaudron @ 2017-11-20 10:27 UTC (permalink / raw)
  To: dev

On 17/11/17 17:19, Timothy Redaelli wrote:
> testpmd is often used inside a VM to test the OVS PVP scenario.
> This commit makes testpmd to link to virtio PMD when DPDK is built as
> shared libraries too.
>
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>   app/test-pmd/Makefile | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
> index 4993c9184..ffc370f0e 100644
> --- a/app/test-pmd/Makefile
> +++ b/app/test-pmd/Makefile
> @@ -87,6 +87,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC),y)
>   LDLIBS += -lrte_pmd_softnic
>   endif
>   
> +ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
> +LDLIBS += -lrte_pmd_virtio
> +endif
> +
>   endif
>   
>   CFLAGS_cmdline.o := -D_GNU_SOURCE


Acked-by: Eelco Chaudron <echaudro@redhat.com>

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

* Re: [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
  2017-11-20 10:27 ` Eelco Chaudron
@ 2017-11-29 22:23   ` Thomas Monjalon
  2017-11-30 11:21     ` Timothy Redaelli
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2017-11-29 22:23 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: dev, echaudro, Jingjing Wu

20/11/2017 11:27, Eelco Chaudron:
> On 17/11/17 17:19, Timothy Redaelli wrote:
> > testpmd is often used inside a VM to test the OVS PVP scenario.
> > This commit makes testpmd to link to virtio PMD when DPDK is built as
> > shared libraries too.
> >
> > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> 
> Acked-by: Eelco Chaudron <echaudro@redhat.com>

I really doubt it is the right fix.
This PMD should be dynamically linked with dlopen as a plugin.
It can be done with -d option or by specifying the plugin directory
at compilation time in CONFIG_RTE_EAL_PMD_PATH.

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

* Re: [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
  2017-11-29 22:23   ` Thomas Monjalon
@ 2017-11-30 11:21     ` Timothy Redaelli
  2017-11-30 13:16       ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Timothy Redaelli @ 2017-11-30 11:21 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, echaudro, Jingjing Wu

On Wed, 29 Nov 2017 23:23:40 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:

> 20/11/2017 11:27, Eelco Chaudron:
> > On 17/11/17 17:19, Timothy Redaelli wrote:  
> > > testpmd is often used inside a VM to test the OVS PVP scenario.
> > > This commit makes testpmd to link to virtio PMD when DPDK is
> > > built as shared libraries too.
> > >
> > > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>  
> > 
> > Acked-by: Eelco Chaudron <echaudro@redhat.com>  
> 
> I really doubt it is the right fix.
> This PMD should be dynamically linked with dlopen as a plugin.
> It can be done with -d option or by specifying the plugin directory
> at compilation time in CONFIG_RTE_EAL_PMD_PATH.

Hi,
I checked that CONFIG_RTE_EAL_PMD_PATH is set correctly when we build
dpdk in Fedora, but unlucky the symlinks for each pmd from the PMD_PATH
to the real librte_pmd_* library (installed in /usr/lib64) on Fedora is
broken since it points to the .so file directly, that is only installed
by dpdk-devel package, instead of correctly point to the .so.[0-9] one
that is installed by the dpdk package and so my patch is not needed
and I'll send the fix on the dpdk Fedora spec file instead.

Just a little question: if testpmd loads the pmds dynamically using
dlopen, why in app/test-pmd/Makefile some PMD are linked at
build time?

Thank you and sorry for the noise.

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

* Re: [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
  2017-11-30 11:21     ` Timothy Redaelli
@ 2017-11-30 13:16       ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2017-11-30 13:16 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: dev, echaudro, Jingjing Wu

30/11/2017 12:21, Timothy Redaelli:
> Just a little question: if testpmd loads the pmds dynamically using
> dlopen, why in app/test-pmd/Makefile some PMD are linked at
> build time?

Some PMD have an API. That's why they need to be directly linked
by the applications calling these driver-specific functions.

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

end of thread, other threads:[~2017-11-30 13:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17 16:19 [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries Timothy Redaelli
2017-11-17 16:43 ` Luca Boccassi
2017-11-20 10:27 ` Eelco Chaudron
2017-11-29 22:23   ` Thomas Monjalon
2017-11-30 11:21     ` Timothy Redaelli
2017-11-30 13:16       ` Thomas Monjalon

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