From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0102.outbound.protection.outlook.com [104.47.1.102]) by dpdk.org (Postfix) with ESMTP id EF8552BAB for ; Fri, 1 Jul 2016 12:16:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector2-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HTJtXUclJTigVKYU/PjmlBXX1sJet+KyCljifYbUv/0=; b=l50EKFUrZOHiJJ/E2SGDjq+oIP7b5tTCOiahVpRnPqnIIGW2ONrASkYrCLpbWnvyAadk/9pIaz/6AqPjoz4lAAWgzwDZ823eFeM5hTLeDnOra4YHDCGMqSL+1oC6h+YLg2SB/pego+nTYDIJcrU10zHryy9y/OL6xnQH6WAWjFo= Received: from VI1PR0701MB1853.eurprd07.prod.outlook.com (10.167.197.13) by VI1PR0701MB1855.eurprd07.prod.outlook.com (10.167.197.15) with Microsoft SMTP Server (TLS) id 15.1.528.16; Fri, 1 Jul 2016 10:16:06 +0000 Received: from VI1PR0701MB1853.eurprd07.prod.outlook.com ([10.167.197.13]) by VI1PR0701MB1853.eurprd07.prod.outlook.com ([10.167.197.13]) with mapi id 15.01.0528.020; Fri, 1 Jul 2016 10:16:06 +0000 From: "Elo, Matias (Nokia - FI/Espoo)" To: Sergio Gonzalez Monroy , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , "damarion@cisco.com" Thread-Topic: [dpdk-dev] weak functions in some drivers Thread-Index: AQHR0qd+F3ZV/uXuXEWQoWbZm000/KABr0ZggAGLFSCAACCDAIAAAqJA Date: Fri, 1 Jul 2016 10:16:06 +0000 Message-ID: References: <3745bde4-f539-21d4-51e4-369d35697e57@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matias.elo@nokia-bell-labs.com; x-originating-ip: [131.228.2.28] x-ms-office365-filtering-correlation-id: 32ba5574-66c7-4187-e25c-08d3a198b707 x-microsoft-exchange-diagnostics: 1; VI1PR0701MB1855; 6:KxQV+BCclAYJvUsms+DE7eU3JgxOWjMw177bvgyufMMd2ocAnTlSSR6wanP2xGGbaLUFQx4XWGUCqoiw0U0b7yUHxPhEkAzEcOffdHQcEd2PFYaDvghtoofV2ARci/b/lgxNS/m75eZjWHq93Bbqi0E787kAGYpEkeKJYPyBBaaJ6gJFpGc6YE82dvSvCKA42LInJ1DT1h9IR4FEMcBYw2GYxZRivoDbdWGJLetTa2A8WCvPBPfqoceFpPOmy1cO+AF3vIIRmeFer5lQZeeGyy39Xwt/MIYPdmB4vGo4WLo=; 5:KkksQWmxHjqXPlQv62T58eKA3iwTKes9dT426q09iAJhuNz+vek0+B8IPnX6UHb7tm3+JjHBAeLy5XhNgiflf74MapSyx7PdTmvFLfi7uTxgTd6HSoZYTxaTCgbz4OQDn73FsdUYqFpJuv4C4TTdJw==; 24:l/iEb1iHnzdP2kGrTFlD579FX1783Axwjl/l4bKHEFHS+7xJU1CSyTnO8OaDhKyvS4LGznqmQgH2hlQpXLhbJ+LAvBw5Yd8fTeY/YvY38tU=; 7:+mb7LVV7IZC8hg1fG84WPHUP5ssyMdgsrQ43RADZ7i2xqytqAUlB41lH0ZWSFpYDT1ju0lRvWDCWOgWlqHreQwVIltK216AtUHj9/VXg522loQLdM5ZIfBy6s+ikabBa7viqSw86c4Egg9OATey+lB5VaOu1Me9MTdNbCYOt11dbawazeNh7M1VFdyesenLRMDgN+3tRQ++xPFq9d8FRl8wPibnEHRGrNPEuK91T1NIiLlYhDje6jtxmxh7K0Trj x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0701MB1855; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(95692535739014)(185212123834332)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:VI1PR0701MB1855; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB1855; x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(24454002)(189002)(377454003)(13464003)(199003)(5002640100001)(66066001)(15395725005)(19580405001)(19580395003)(7736002)(5001770100001)(7846002)(8676002)(102836003)(6116002)(92566002)(3846002)(81166006)(305945005)(2950100001)(81156014)(1720100001)(74316002)(7696003)(33656002)(5003600100003)(586003)(15975445007)(77096005)(97736004)(2900100001)(106356001)(50986999)(93886004)(76176999)(189998001)(68736007)(101416001)(9686002)(3280700002)(3660700001)(106116001)(4326007)(76576001)(11100500001)(2906002)(87936001)(10400500002)(2501003)(86362001)(105586002)(122556002)(8936002)(54356999)(90052001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB1855; H:VI1PR0701MB1853.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:0; LANG:en; received-spf: None (protection.outlook.com: nokia-bell-labs.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nokia-bell-labs.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2016 10:16:06.4457 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB1855 Subject: Re: [dpdk-dev] weak functions in some drivers 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: Fri, 01 Jul 2016 10:16:08 -0000 > -----Original Message----- > From: Sergio Gonzalez Monroy [mailto:sergio.gonzalez.monroy@intel.com] > Sent: Friday, July 01, 2016 1:05 PM > To: Elo, Matias (Nokia - FI/Espoo) ; > dev@dpdk.org > Cc: ferruh.yigit@intel.com; damarion@cisco.com > Subject: Re: [dpdk-dev] weak functions in some drivers >=20 > On 01/07/2016 10:42, Elo, Matias (Nokia - FI/Espoo) wrote: > >>>>>> What is not clear to me is motivation to use weak here instead of = simply > >>> using >CONFIG_RTE_I40E_INC_VECTOR > >>>>>> macro to exclude stubs in i40e_rxtx.c. It will make library smalle= r and > avoid > >>> issues like this one > >>>>>> which are quite hard to troubleshoot. > >>>>> Since this issue seen in fd.io, I didn't investigated more, but I d= on't > >>>>> want to clock your valid question, this is an attempt to resurrect = the > >>>>> question ... > >>>> Hi, > >>>> > >>>> We are having exactly the same problem. For us the aforementioned > >>> workaround doesn't seem to work and vector mode is always disabled wi= th > the > >>> i40e drivers. If I modify i40e_rxtx.c and exclude the stub functions = using > >>> CONFIG_RTE_I40E_INC_VECTOR everything works as expected. > >>>> We are building DPDK with the CONFIG_RTE_BUILD_COMBINE_LIBS option > >>> enabled and link DPDK library to our application. > >>>> Any other ideas how this could be fixed? > >>>> > >>>> Regards, > >>>> Matias > >>>> > >>> So you have tried to link a combined static lib with --whole-archive > >>> -ldpdk --no-whole-archive and still get the wrong/weak function defin= ition? > >>> > >>> Sergio > >> I actually just managed to fix the problem. In our case I had to add > >> '-Wl,--whole-archive,-ldpdk,--no-whole-archive' to the end of AM_LDFL= AGS. > >> > > It turned out that the problem actually wasn't fixed. > > > > DPDK is built with CONFIG_RTE_BUILD_COMBINE_LIBS=3Dy and > EXTRA_CFLAGS=3D"-fPIC" > > > > What we are linking originally: > > -l:libdpdk.a > > > > This works otherwise but vector mode i40e is not enabled. > > > > When trying: > > -Wl,--whole-archive,-l:libdpdk.a,--no-whole-archive > > > > Linking fails with ' undefined reference' errors to several dpdk functi= ons > (rte_eal_init, rte_cpu_get_flag_enabled, rte_eth_stats_get...). > > > > Btw. there seems to be a Stack Overflow question related to this: > http://stackoverflow.com/questions/38064021/dpdk-include-libraries-in-dpd= k- > application-compiled-as-shared-library > > > > -Matias >=20 > What DPDK version are you using? v16.04