DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Damjan Marion (damarion)" <damarion@cisco.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] weak functions in some drivers
Date: Tue, 21 Jun 2016 16:08:32 +0000	[thread overview]
Message-ID: <11245F75-3C8B-4D6A-8F5E-D81A4177AFAC@cisco.com> (raw)
In-Reply-To: <576964F7.3020804@intel.com>



> On 21 Jun 2016, at 09:01, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> Hi Damjan,
> 
> On 6/21/2016 4:01 PM, Damjan Marion (damarion) wrote:
>> 
>> Hello,
>> 
>> We just spent few hours troubleshooting why vPMD is not working
>> in i40e driver. Conclusion was that problem is caused by linker 
>> linking the wrong instance of the i40e_rx_vec_dev_conf_condition_check(...).
>> 
>> That function is defined 2 times, once in i40e_rxtx.c and once in 
>> i40e_rxtx_vec.c. First one is defined as weak and it just returns -1.
>> 
>> librte_pmd_i40e.a contains both versions:
>> 
>> $ objdump -x librte_pmd_i40e.a| grep i40e_rx_vec_dev_conf_condition_check
>> 0000000000006ca0  w    F .text	0000000000000006 i40e_rx_vec_dev_conf_condition_check
>> 00000000000007c1 g     F .text.unlikely	000000000000001c i40e_rx_vec_dev_conf_condition_check
>> 
>> However when we are linking our app, linker was picking 1st (weak) one and vPMD init was failing.
> App is linking with correct instance of the function for me, how can I
> reproduce this linkage issue?
> 
>> 
>> Workaround we applied to get int working:  -Wl,--whole-archive <LIBS> -Wl,—no-whole-archive
> These flags already wraps PMD libraries, can you please give more detail
> about workaround?
> 

You can see our exact fix here:

https://git.fd.io/cgit/vpp/commit/?id=0977e4baabd97d1de711a3d7a0f285364a84159c

If you want to repro just pick the commit before this one…

Thanks,

Damjan



  reply	other threads:[~2016-06-21 16:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 15:01 Damjan Marion (damarion)
2016-06-21 16:01 ` Ferruh Yigit
2016-06-21 16:08   ` Damjan Marion (damarion) [this message]
2016-06-27 18:13 ` Ferruh Yigit
2016-06-29 13:26 Elo, Matias (Nokia - FI/Espoo)
2016-06-30  8:14 ` Sergio Gonzalez Monroy
2016-06-30  8:40   ` Elo, Matias (Nokia - FI/Espoo)
2016-07-01  9:42     ` Elo, Matias (Nokia - FI/Espoo)
2016-07-01 10:05       ` Sergio Gonzalez Monroy
2016-07-01 10:16         ` Elo, Matias (Nokia - FI/Espoo)
2016-07-01 10:19           ` Sergio Gonzalez Monroy
2016-07-14 15:43             ` Zoltan Kiss

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=11245F75-3C8B-4D6A-8F5E-D81A4177AFAC@cisco.com \
    --to=damarion@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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).