DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Damjan Marion (damarion)" <damarion@cisco.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] weak functions in some drivers
Date: Tue, 21 Jun 2016 17:01:59 +0100	[thread overview]
Message-ID: <576964F7.3020804@intel.com> (raw)
In-Reply-To: <9A518F3E-04B9-4E40-BDDE-B16433A21BF9@cisco.com>

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?

Thanks,
ferruh

  reply	other threads:[~2016-06-21 16:02 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 [this message]
2016-06-21 16:08   ` Damjan Marion (damarion)
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=576964F7.3020804@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=damarion@cisco.com \
    --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).