From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02hn0229.outbound.protection.outlook.com [104.47.6.229]) by dpdk.org (Postfix) with ESMTP id 3FB85235 for ; Tue, 24 Jul 2018 15:03:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=06p8N7QJPtQYL3SdtoBjZtPGZq3eehjrJ1ZF6xWnNmo=; b=TSW4zwZnChLG0Xn2VohLsyfQuiWWfwu8apBSrQG6TpiSC9zl+AA9q1W/p+9BZeDRUA1GqrdFNDFxji1aiGPuYU417q7ixeSFqhGo/9vMOVyic2MR/NB+zGBv3QATXHA99XTZR9tcMw9FwsoS0GTbjtsy+OolCmZmL2DS27W0zKw= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB5034.eurprd05.prod.outlook.com (20.176.236.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Tue, 24 Jul 2018 13:03:28 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3%3]) with mapi id 15.20.0952.022; Tue, 24 Jul 2018 13:03:28 +0000 From: Shahaf Shuler To: Adrien Mazarguil CC: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , "dev@dpdk.org" , Yongseok Koh Thread-Topic: [PATCH] mk: fix application compilation with lmnl and mlx5 Thread-Index: AQHUIzDP+hJIi2bht0eHYPbwhmIV3KSeLpRQgAAmXACAAACD8A== Date: Tue, 24 Jul 2018 13:03:28 +0000 Message-ID: References: <14690e825609ee181e3cd522302d4788ef436f35.1532424524.git.nelio.laranjeiro@6wind.com> <20180724125556.GS5211@6wind.com> In-Reply-To: <20180724125556.GS5211@6wind.com> 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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB5034; 7:jKFw6CNthpCuK8GAWYFsRLUQmmdn8xNRW1LqIw6eo21FPnO6w7LQXlXXY1xEo7NcsJ/z5KZfMmoGSZCAe52PNvDfTa8+0dAMqX9rtF3zZ1q1Ortu9ODS0XCE6ls0Nn3eqQjQ6F203Zxi18xmcTbALWeb+Zw9//A+OnoaRP+kPdgZHFhdg8hGSTCrid16vORJTvGELOwUQk1IdWQUuIGYfk/wr4Md5xKKgZTiCRQ3a6dqO+Eia82jlV8oJR6EPqJ6 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 4d480abb-51bf-4844-9a38-08d5f165d9b1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB5034; x-ms-traffictypediagnostic: DB7PR05MB5034:|DB7PR05MB5034: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397)(66839620246622); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(2232096)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB5034; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB5034; x-forefront-prvs: 0743E8D0A6 x-forefront-antispam-report: SFV:SPM; SFS:(10009020)(136003)(39860400002)(376002)(346002)(366004)(396003)(189003)(199004)(26005)(102836004)(7696005)(105586002)(4326008)(54906003)(186003)(99286004)(7736002)(6246003)(86362001)(107886003)(106356001)(76176011)(6916009)(9686003)(66066001)(8676002)(478600001)(6506007)(2900100001)(68736007)(55016002)(6436002)(5660300001)(11346002)(5250100002)(446003)(305945005)(3846002)(2906002)(74316002)(53936002)(6116002)(25786009)(33656002)(81166006)(316002)(8936002)(14454004)(486006)(81156014)(229853002)(97736004)(256004)(14444005)(476003)(59010400001); DIR:OUT; SFP:1501; SCL:5; SRVR:DB7PR05MB5034; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: EgrgyufPJmLSd12ciIyfYcmM8u6d5gun4nBxFwpDDjS6IeEpUh9cNStBypaekF1jEyxYSCn0A1NgcgGrC7YT0Fx3wCQ9sf9lS5G5q8rc7E97wZJuUPCtXtwOj4Fu6k1TFpgXlUYNqzeqGMvw/6//I0mWM54YAtpsL3QI7lX2BK57/wVqjeViE9RPBq4+vFWH2M5DhAsg0aWdWSVlcW9V2cGQrbp8Xp1pY3dfynsi3scgY6lBJJk3b5EWA3JP338lmJ39gjii+dwa3YRqY8D3dWv9eLaT0VYOWJkCplFt2XlD04G9mvK9QfmLkQZrYL9CVp7A02ROsLyqaHNIthp7Q4A4jRhJIlxYC4/1SIPyGEDbwDVTDhMjzHGax8cem1A96PFohKvP3/vCYRWzG6ryycRmhbY62dXxz3N4LSxpV9yoEPJpNbOzS/gwD/zwOvHMEOAMml2uX95hxTgwFKzp/Es+z7IgPkgq6WvJjJ1NR1DzhoRlgqPPRYfaoM54/VzVCXZJc9kCFV7iqN6iPnei0K7fKCRdSjmK3V813FrY3kQyuyEgIT/DpYmbx7gZNLNkANtVeysyqbu3pb67V/zqy+LhnPSbH20ORhL3iJuG7VsHLKQd3jbfuwYwc8dMoOLLbE79E8iXCUCoeQkmyFwZPHnv7xjQ8YjQXaxoUcUkKH9dKDZKg4RGhXqZuQ5u08jMqBJjwvQgIaPmsFFIEi5HQQ== spamdiagnosticoutput: 1:22 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d480abb-51bf-4844-9a38-08d5f165d9b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2018 13:03:28.8454 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5034 Subject: Re: [dpdk-dev] [PATCH] mk: fix application compilation with lmnl and mlx5 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 13:03:40 -0000 Tuesday, July 24, 2018 3:56 PM, Adrien Mazarguil: > Subject: Re: [PATCH] mk: fix application compilation with lmnl and mlx5 >=20 > On Tue, Jul 24, 2018 at 11:21:52AM +0000, Shahaf Shuler wrote: > > Tuesday, July 24, 2018 12:29 PM, Nelio Laranjeiro: > > > Subject: [PATCH] mk: fix application compilation with lmnl and mlx5 > > > > > > When Mellanox MLX5 PMD is compiled with > > > CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS=3Dy, the external dependency > on > > > libmln is missing. > > > > > > Fixes: 4d5cce06231a ("net/mlx5: lay groundwork for switch offloads") > > > Cc: adrien.mazarguil@6wind.com > > > > > > Signed-off-by: Nelio Laranjeiro > > > --- > > > mk/rte.app.mk | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/mk/rte.app.mk b/mk/rte.app.mk index > > > f4d28c2da..ff39d37aa > > > 100644 > > > --- a/mk/rte.app.mk > > > +++ b/mk/rte.app.mk > > > @@ -149,7 +149,7 @@ else > > > _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) +=3D -lrte_pmd_mlx4 - > > > libverbs -lmlx4 > > > endif > > > ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y) > > > -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) +=3D -lrte_pmd_mlx5 -ldl > > > +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) +=3D -lrte_pmd_mlx5 -ldl > - > > > lmnl > > > > This issue raise some more basic question. > > The DLOPEN mode was introduced to run in systems which don't have > verbs/mlx5 libs installed, because those were the only dependencies for t= he > PMD back then. > > Now we have the libmnl, which is external dependency just like rdma-cor= e, > and following your fix, hard linked also in case of DLOPEN option. > > It means the whole DPDK binary/lib will be depended on libmnl and this = is > not what we want with DLOPEN. > > > > Can we consider different options: > > 1. always statically link libmnl > > 2. dlopen libmnl just like we do for verbs/mlx5 >=20 > Regarding 2, unlike rdma-core/MLNX_OFED, libmnl should be available prett= y > much everywhere iproute2 can be found. The minimal version supported > (1.0.3) was released in 2012. >=20 > Using the glue approach for such a small library seems overkill; should w= e > choose this path, we must also consider to get rid of it entirely since d= oing so > would require more glue code than what mlx5 needs from this library. >=20 > So with the current approach, either the application or the PMD inherits = a > dependency to libmnl, depending on whether > CONFIG_RTE_BUILD_SHARED_LIB is respectively disabled or enabled. >=20 > If disabled, applications that want static linkage can specify -static as= part of > their compilation flags to let the compiler automatically look for libmnl= .a as > needed.=20 Can you confirm static compilation w/ libmnl is working w/o any issues?=20 To put this in perspective, this also applies to all other dependencies > it will collect while compiling DPDK (libz, libdl, libpcap, libnuma to na= me a > few). >=20 > In my opinion, the purpose of *_DLOPEN_DEPS is to deal with large, > nonstandard libraries where versioning issues are commonplace. This doesn= 't > apply to libmnl, which shouldn't be a maintenance nightmare to package > maintainers. I suggest to leave things as is. >=20 > -- > Adrien Mazarguil > 6WIND