From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa0-f46.google.com (mail-oa0-f46.google.com [209.85.219.46]) by dpdk.org (Postfix) with ESMTP id 47E3658E6 for ; Sun, 3 Aug 2014 13:39:38 +0200 (CEST) Received: by mail-oa0-f46.google.com with SMTP id m1so4240481oag.19 for ; Sun, 03 Aug 2014 04:41:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3ad6U5A2UJKwrIHll2SpGtEgUow4tvR7u++rX0oCFzg=; b=HBZVoii+ahvpssYhsD948yx+LLRog4M9W9fc1+OaOz+MxShFXBh10FVm2VLRrwCnHJ qOLnR0B7luItYnCi/wTfYWJn+KFVxFoASTzEjs5CfjXQFM8YCI/au6Am+Pxb/teimiLX LohEDp5Le/DHZnLiuWk62xfNqDRPupu6+SfJGu4SZDdtvbdRn1T7u0y22Mr4exALJOpx IXps/QxrYGlSlc7ZYMIfEQ4O/avQUaBotsdlIOHwS/cqXSiqhT0Kr7eBqMFxeKe4PK5b PvzbWdmnX8ZjvEUeimN1eoKodDJ5hmJxtjSefrQ42g4FHwBtslqJkht+mJAC9+6+FnjC Joig== X-Gm-Message-State: ALoCoQkmgKNE3UMUiX3rQKkDlBlDJ2A2gUb/ZVn/VG/OBSgkQEU6qDn6ZtmgA+xp19w0jTepAbji MIME-Version: 1.0 X-Received: by 10.182.3.100 with SMTP id b4mr2215116obb.79.1407066111201; Sun, 03 Aug 2014 04:41:51 -0700 (PDT) Received: by 10.202.55.198 with HTTP; Sun, 3 Aug 2014 04:41:51 -0700 (PDT) In-Reply-To: References: <20140801175138.GA31733@mhcomputing.net> <20140802152904.GA9064@mhcomputing.net> <20140802154310.GA9104@mhcomputing.net> <20140802164600.GA9312@mhcomputing.net> Date: Sun, 3 Aug 2014 14:41:51 +0300 Message-ID: From: Alex Markuze To: Matthew Hall Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Debugging EAL PCI / Driver Init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 11:39:38 -0000 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 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 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.