DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gonzalez Monroy, Sergio" <sergio.gonzalez.monroy@intel.com>
To: Matthew Hall <mhall@mhcomputing.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] virtio UIO / PMD issues in default Ubuntu Cloud Images
Date: Wed, 22 Oct 2014 15:20:40 +0000	[thread overview]
Message-ID: <91383E96CE459D47BCE92EFBF5CE73B0C7FD90@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <20141022071753.GB6051@mhcomputing.net>

> -----Original Message-----
> From: Matthew Hall [mailto:mhall@mhcomputing.net]
> Subject: Re: [dpdk-dev] virtio UIO / PMD issues in default Ubuntu Cloud
> Images
> 
> > - we do not want to build against static DPDK libraries as this would
> > result in duplicated code in librte_pmd_virtio and other apps (ie.
> > testpmd)
> >
> > - we want to link against shared DPDK libs to add dependencies and
> > provide reliable information (ie. ldd)
> 
> OK... but now it's impossible to use librte_pmd_virtio w/o mandatory share
> library performance loss. I strongly dislike being force to do this.
> 
You are not forced to use shared libraries. This module loads successfully with an app (testpmd) built against static DPDK libs.

> OK... let me try to clarify this point again. In this official DPDK support device
> document, http://www.dpdk.org/doc/nics , it says:
> 
>     Paravirtualization
>     virtio-net or virtio-net + uio (QEMU, VirtualBox)
> 
> As I've stated, when testing this on VirtualBox it does not work for me and
> gets into an infinite initialization loop which I documented in my last mail.
> But the same code works fine if it's using the VBox Intel 82545EM VNIC and
> appropriate driver. Also the VBox virtio-net device works completely fine
> using the kernel virtio-net driver. This making the virtio PMD's the most likely
> suspect, especially since the UIO based one can't init itself, and the non UIO
> one gets stuck in the loop.
> 
I have reproduced this issue in VirtualBox:
- For UIO Virtio PMD, there is an issue with igb_uio module and virtio vbox backend device, I fail to bind igb_uio driver to the virtio device.
- For non-UIO Virtio PMD, the module fails to initialize properly as you have indicated in your previous post (stuck in a loop).

I get this behavior with testpmd regardless of DPDK being built as static or shared.

> > > EAL: open shared lib
> > > /vagrant/external/virtio-net-pmd/librte_pmd_virtio.so
> > > EAL: /vagrant/external/virtio-net-pmd/librte_pmd_virtio.so:
> > > undefined
> > > symbol: per_lcore__lcore_id
> > >
> > Are we talking about a DPDK or custom app?
> > Do you only see the issue when CONFIG_RTE_BUILD_COMBINE_LIBS=y?
> 
> Issue happens in my DPDK based app.
> 
> Can happen anytime you use static linked DPDK app w/ the
> librte_pmd_virtio.
> Because the link process of librte_pmd_virtio is broken.
> 
The linking is not broken if we are assuming apps built against static DPDK libs.
I can't think of other way of linking this module to be used in apps with static DPDK libs.

> > > Running nm and nm -D shows this:
> > >
> > > $ nm librte_pmd_virtio.so | fgrep -i per_lcore__lcore_id U
> > > per_lcore__lcore_id
> > >
> > This is expected behavior as the symbol is defined in librte_eal.
> > The dynamic linker will resolve the undefined reference when loading the
> module in run-time.
> 
> I am aware it's "expected behavior". But have the undefined symbol, and no
> dependency upon the DPDK .so and no link against the DPDK .a is NOT
> "expected behavior". It will break anytime you try to make a static app with
> this PMD available.
> 
Have you built static DPDK libs and run testpmd?

Your undefined symbol error is most likely because the symbol is not in the dynamic symbol table of you app.
You need to pass -rdynamic to GCC or -export-dynamic to LD when building your app.

Thanks,
Sergio

> Matthew.

  reply	other threads:[~2014-10-22 15:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14  5:45 Matthew Hall
2014-10-14  6:03 ` Matthew Hall
2014-10-14  6:34   ` Matthew Hall
2014-10-14  8:22     ` Gonzalez Monroy, Sergio
2014-10-14  8:34       ` Matthew Hall
2014-10-14 12:16         ` Gonzalez Monroy, Sergio
2014-10-17  8:56           ` Matthew Hall
2014-10-21 13:22             ` Gonzalez Monroy, Sergio
2014-10-22  7:17               ` Matthew Hall
2014-10-22 15:20                 ` Gonzalez Monroy, Sergio [this message]
2014-10-22 18:41                   ` Matthew Hall
2014-10-23 16:15                     ` Gonzalez Monroy, Sergio
2014-10-14  6:43   ` Matthew Hall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91383E96CE459D47BCE92EFBF5CE73B0C7FD90@IRSMSX108.ger.corp.intel.com \
    --to=sergio.gonzalez.monroy@intel.com \
    --cc=dev@dpdk.org \
    --cc=mhall@mhcomputing.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).