From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0106.outbound.protection.outlook.com [104.47.1.106]) by dpdk.org (Postfix) with ESMTP id 555D428FD for ; Fri, 1 Jul 2016 11:42:21 +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=+sWJojMLoZxRegtqqH3aQhmiEubZ9UsTqkpxsmelYbo=; b=BUoFg3DN8m2qazT96Da9GDuk71PeclyIt/ubA/lTlFSMEIuo+0NaXZa3h1UbhNTngnbuA6vb3iYYhFDoA9ZENfOgUYTrEGcRAYOWHYV6vDv3C1AarqadfZB8PEREWzQcS/uBeBZ/5UsxLIbvzoeBRH1uXLNDEEg9+D0aTBCzxSU= Received: from VI1PR0701MB1853.eurprd07.prod.outlook.com (10.167.197.13) by VI1PR0701MB1854.eurprd07.prod.outlook.com (10.167.197.14) with Microsoft SMTP Server (TLS) id 15.1.528.16; Fri, 1 Jul 2016 09:42:20 +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 09:42:20 +0000 From: "Elo, Matias (Nokia - FI/Espoo)" To: "Elo, Matias (Nokia - FI/Espoo)" , "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/KABr0ZggAGLFSA= Date: Fri, 1 Jul 2016 09:42:19 +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: 0a22da22-996f-464d-fd53-08d3a193ff09 x-microsoft-exchange-diagnostics: 1; VI1PR0701MB1854; 6:T1hLElJDm944vD3uqJudYBnyBJizsIpxF3tu98atarR2FG3fK6e+e/CW/hdz8G7m4K0Dj522fxGIotFek1MSSoEO2FwxaEqETgTpPGSDJl0ekF3uhLAoIMt14YvcgwBCg29En0rZnft6sDJC1TmklTRu7B9RWsuLbm322zh7olnEPnPCPGEuSN03CUuYbgdnz0YOEfsMN3Yyh5C4QaYIeCZ6O1B6Wc75RMPryMo3rrx8xIWBwBB06fGzSb0RvqGNp53FLHwwadLb0AHTHzmcg283pNQWgV7xF2w00ej4PK4=; 5:6rv17fbNwOjQPonkmTG1sNGTChJneVzixSTXZFnJG+8CnyXVhqJVZWcdtFF296rgWgKFh0YKZdimm27mBx2cPSynppDmGl5YNNB5RpS9j16zsSCcGOhBuXresxrDqm1l3Tf73NcqHFOxZIaD0Umq1A==; 24:PaorUxqTzOG7buZICt81NU6u+amsujWO22rfZp7fyeTqV+iJVEZiNw+7eX5z0iRWSoA6h9PQ5t09aKQFu2W6lU1AFY/rXBKKdqI9FSqfbVw=; 7:SDBjz6Ru1PPjZLPav3ioVJQnKFEx9N1u/iJRHWDfspJNd8zwXX6/JTb3cjuKwSeaa/QuElheRlLDBELifqqtP2NNcbQxGuMCfJ2ICZfIujyDMeDL+zTbX7krp5P6C5jkN4apVPoLk7C7+Ksr7+WehakdVJT0MHcuChtlgMjJ0p8FzdX192EoSfl5sDjDZ1tR+X7/+Or4qPU5fj2uv7/TPW4OHywdnGw59j2cdu/f7ApIy1NtqQcCzrP9c1MiKNZN x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0701MB1854; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185212123834332); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:VI1PR0701MB1854; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB1854; x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(189002)(19580395003)(7736002)(15395725005)(5001770100001)(122556002)(5003600100003)(106116001)(68736007)(54356999)(97736004)(87936001)(76176999)(189998001)(9686002)(7846002)(8676002)(3280700002)(305945005)(8936002)(3660700001)(74316002)(105586002)(7696003)(106356001)(81166006)(101416001)(81156014)(66066001)(2906002)(2900100001)(86362001)(2950100001)(50986999)(5002640100001)(4326007)(10400500002)(2501003)(76576001)(92566002)(586003)(6116002)(102836003)(3846002)(33656002)(77096005)(1720100001)(15975445007)(11100500001)(90052001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB1854; H:VI1PR0701MB1853.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:1; 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 09:42:19.8689 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB1854 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 09:42:21 -0000 > > >>> What is not clear to me is motivation to use weak here instead of s= imply > > using >CONFIG_RTE_I40E_INC_VECTOR > > >>> macro to exclude stubs in i40e_rxtx.c. It will make library smaller= 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 do= n't > > >> want to clock your valid question, this is an attempt to resurrect t= he > > >> 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 with= the > > i40e drivers. If I modify i40e_rxtx.c and exclude the stub functions us= ing > > 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 definit= ion? > > > > Sergio >=20 > 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_LDFLAGS= . >=20 It turned out that the problem actually wasn't fixed. DPDK is built with CONFIG_RTE_BUILD_COMBINE_LIBS=3Dy and EXTRA_CFLAGS=3D"-f= PIC" 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 functions = (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://st= ackoverflow.com/questions/38064021/dpdk-include-libraries-in-dpdk-applicati= on-compiled-as-shared-library=20 -Matias