DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matthew Hall <mhall@mhcomputing.net>
To: Alex Markuze <alex@weka.io>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Debugging EAL PCI / Driver Init
Date: Sun, 03 Aug 2014 10:23:16 -0700	[thread overview]
Message-ID: <bf0653a3-6e73-4e51-a626-cfb4544d3fe3@email.android.com> (raw)
In-Reply-To: <CAKfHP0UQRtDLU4pDwSoJF0AJfhPFkuo6R6vLrHcAd20VRHWfWA@mail.gmail.com>

There is an option in the DPDK build config which compiles every DPDK lib into a single static lib. I don't have the name of the option in front of me but it had COMBINE in its name. When this option is used you can get every function in the whole DPDK with a single library. After that I had a lot fewer linking issues.

Matthew.
-- 
Sent from my mobile device.

On August 3, 2014 4:41:51 AM PDT, Alex Markuze <alex@weka.io> wrote:
>Resolved just as Matt has described.
>To remove any ambiguity (for future reference).
>
>This line in the gcc command resolves the issue in my case (a
>different nic may need a different lib):
>--whole-archive -Wl,--start-group -lrte_pmd_ixgbe -Wl,--end-group -Wl,
>
>The problem is that the probe command polls over all pci devices and
>tries to find a matching driver, these drivers register
>With these macros which will only be called when the --whole-archive
>option is provided and its actually the reason for this flags
>existence. Without this flag the driver list is empty.
>
>PMD_REGISTER_DRIVER(rte_ixgbe_driver);
>PMD_REGISTER_DRIVER(rte_ixgbevf_driver);
>
>
>On Sun, Aug 3, 2014 at 1:38 PM, Alex Markuze <alex@weka.io> wrote:
>> Hi Matt, Dev
>> I'm Trying to compile ann app linking to dpdk and dpdk based libs.
>> And I'm seeing the same issue you've reported.
>> The probe function doesn't seem to find any ixgbevf(SRIOV VM) ports.
>> Same code compiled as a dpdk app works fine.
>>
>> In your solution to this issue you are referring to  -lintel_dpdk? I
>> couldn't find any reference to it.
>>
>> Thanks
>> Alex.
>>
>>
>> On Sat, Aug 2, 2014 at 7:46 PM, Matthew Hall <mhall@mhcomputing.net>
>wrote:
>>> On Sun, Aug 03, 2014 at 01:37:06AM +0900, Masaru Oki wrote:
>>>> cc links library funtion from archive only if call from other
>object.
>>>> but new dpdk pmd library has constractor section and not call
>directly.
>>>> ld always links library funtion with constractor section.
>>>> use -Xlinker, or use ld instead of cc.
>>>
>>> Hello Oki-san,
>>>
>>> The trick to fix it was this, I finally found it in the example
>Makefiles with
>>> V=1 flag.
>>>
>>> -Wl,--whole-archive -Wl,--start-group -lintel_dpdk -Wl,--end-group
>-Wl,--no-whole-archive
>>>
>>> Thank you for the advice you provided, I couldn't have fixed it
>without your
>>> suggestions... it got me to look more closely at the linking.
>Importantly,
>>> "-Wl,--whole-archive" includes the entire archive whether or not
>it's called
>>> from other objects, so we don't lose the constructors, just like you
>said.
>>>
>>> Matthew.

  reply	other threads:[~2014-08-03 17:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 17:51 Matthew Hall
2014-08-02 15:29 ` Matthew Hall
2014-08-02 15:43   ` Matthew Hall
     [not found]     ` <CAFLKUzKOPxC4jQBG6C07QXJ=MrcydxG9FdHD6h7omj6BY=99LQ@mail.gmail.com>
2014-08-02 16:46       ` Matthew Hall
2014-08-03 10:38         ` Alex Markuze
2014-08-03 11:41           ` Alex Markuze
2014-08-03 17:23             ` Matthew Hall [this message]
2014-08-03 18:13               ` Jayakumar, Muthurajan
2014-08-03 21:39                 ` 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=bf0653a3-6e73-4e51-a626-cfb4544d3fe3@email.android.com \
    --to=mhall@mhcomputing.net \
    --cc=alex@weka.io \
    --cc=dev@dpdk.org \
    /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).