From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id EB95FF11 for ; Wed, 29 Aug 2018 13:59:53 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id j192-v6so5262189wmj.1 for ; Wed, 29 Aug 2018 04:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to:openpgp :user-agent; bh=T6PJdsqHNVI9fNIxCuJjo6fbh+r2u8edxEzqkXEMag4=; b=tqAFTeP78oKs88Bn4fsWxTO41t8MTwH6UOFAjC4hBT4Ql1QG2MbiArGvSAm6Bzo6QN LrDesb3ITEZO689nxv2ytsvYSWpjkFJuYL09xqShm4wSIW2l3HwopNyqS+gPiHMIwmHo TuqU7nq8D8iaXQ5RYZ10Anef020jBQsKzWNYBXcpkSnV8tRvOutPfDb20ATIm4f7qvjm xxn5+zTvX7iOnDPeOMzWZmCFuZ9qhAlQ0e66N4m+3Jex6/wt6AvBnNe7nNCE8McquqiE IQ8oQEphK5GLHxqigd5tNFtJqJjCZ+7BEooImRVBBhTZBzcXdRpRjfanAqHZiIMzvOpo P6Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:openpgp:user-agent; bh=T6PJdsqHNVI9fNIxCuJjo6fbh+r2u8edxEzqkXEMag4=; b=nBiMAdMtBONAbSdcRbSoycHJC651SKkOoBouDVi4V94cLmZt2ofDDBxoBVvM6Zjnuj 4a2ZpzrNxJUuh+SbXZmrHLrQ8tF4Uvtoj4M6jgA78FiP/YSNl6GpqT1t0yRonwpdzEMN qTwM0SzVX8U6OuwvMjn3BKx1j8EM+PJ8QP1wFx/QOIfF5gKWHphPs5CKWUfkmiLgRmpd Dr82HehFBt/Fe1GyadflPdN3djSijgNv8f3a9l6mVo90AF22sdFk8Rbwj3S3aNKl7LJv HD9gLRT9Uq5/xUb1p/SfmcZlvbKZlvkaG54QV4Zq+cixBv+wCsmERCo4NI7CSD6NdkhG uxag== X-Gm-Message-State: APzg51BEuw1v91J8OaO/JQjeebffGjO0lVfrOTszlI3YpFnRwrAN6zXQ TqV6S/jSY8th9S/1TdNVIScl X-Google-Smtp-Source: ANB0VdZJ3Q+32OV8iA/0VSdMFoLHQceb2Q+8iBq9+aGZo9qnr5Nc2W32iMuPPmjvj7/eJIHDr6QgJQ== X-Received: by 2002:a1c:4e16:: with SMTP id g22-v6mr4358818wmh.111.1535543993698; Wed, 29 Aug 2018 04:59:53 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id n11-v6sm3142687wra.26.2018.08.29.04.59.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 04:59:52 -0700 (PDT) Date: Wed, 29 Aug 2018 13:59:42 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Luca Boccassi Cc: Bruce Richardson , dev@dpdk.org, Yongseok Koh , Shahaf Shuler , Matan Azrad Message-ID: <20180829115942.iog3bk4xkmi3newe@laranjeiro-vm.dev.6wind.com> References: <7812af2267017898332783e934bef9478814ae96.1535361299.git.nelio.laranjeiro@6wind.com> <85a2b398fecdf917dc22810ea0974a91ccca1d13.1535373640.git.nelio.laranjeiro@6wind.com> <20180828154500.GA4208@bricha3-MOBL.ger.corp.intel.com> <1535536854.1113.33.camel@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1535536854.1113.33.camel@debian.org> OpenPGP: id=A0075DA8F66A5949 preference=signencrypt User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2] net/mlx: add meson build support 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: Wed, 29 Aug 2018 11:59:54 -0000 On Wed, Aug 29, 2018 at 11:00:54AM +0100, Luca Boccassi wrote: > On Tue, 2018-08-28 at 16:45 +0100, Bruce Richardson wrote: > > Thanks for this, comments inline below. > > > > /Bruce > > > > On Mon, Aug 27, 2018 at 02:42:25PM +0200, Nelio Laranjeiro wrote: > > > Mellanox drivers remains un-compiled by default due to third party > > > libraries dependencies.  They can be enabled through: > > > - enable_driver_mlx{4,5}=true or > > > - enable_driver_mlx{4,5}_glue=true > > > depending on the needs. > > > > The big reason why we wanted a new build system was to move away from > > this > > sort of static configuration. Instead, detect if the requirements as > > present and build the driver if you can. > > > > > > > > To avoid modifying the whole sources and keep the compatibility > > > with > > > current build systems (e.g. make), the mlx{4,5}_autoconf.h is still > > > generated by invoking DPDK scripts though meson's run_command() > > > instead > > > of using has_types, has_members, ... commands. > > > > > > Meson will try to find the required external libraries.  When they > > > are > > > not installed system wide, they can be provided though CFLAGS, > > > LDFLAGS > > > and LD_LIBRARY_PATH environment variables, example (considering > > > RDMA-Core is installed in /tmp/rdma-core): > > > > > >  # CLFAGS=-I/tmp/rdma-core/build/include \ > > >    LDFLAGS=-L/tmp/rdma-core/build/lib \ > > >    LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \ > > >    meson -Denable_driver_mlx4=true output > > > > > >  # CLFAGS=-I/tmp/rdma-core/build/include \ > > >    LDFLAGS=-L/tmp/rdma-core/build/lib \ > > >    LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \ > > >    ninja -C output install > > > > Once the CFLAGS/LDFLAGS are passed to meson, they should not be > > needed for > > ninja. The LD_LIBRARY_PATH might be - I'm not sure about that one! :- > > ) > > > > > > > > Signed-off-by: Nelio Laranjeiro > > > > > > --- > > > > > > Changes in v2: > > > > > > - dropped patch https://patches.dpdk.org/patch/43897/ > > > - remove extra_{cflags,ldflags} as already honored by meson through > > > environment variables. > > > --- > > >  drivers/net/meson.build      |   2 + > > >  drivers/net/mlx4/meson.build |  94 ++++++ > > >  drivers/net/mlx5/meson.build | 545 > > > +++++++++++++++++++++++++++++++++++ > > >  meson_options.txt            |   8 + > > >  4 files changed, 649 insertions(+) > > >  create mode 100644 drivers/net/mlx4/meson.build > > >  create mode 100644 drivers/net/mlx5/meson.build > > > > > > diff --git a/drivers/net/meson.build b/drivers/net/meson.build > > > index 9c28ed4da..c7a2d0e7d 100644 > > > --- a/drivers/net/meson.build > > > +++ b/drivers/net/meson.build > > > @@ -18,6 +18,8 @@ drivers = ['af_packet', > > >   'ixgbe', > > >   'kni', > > >   'liquidio', > > > + 'mlx4', > > > + 'mlx5', > > >   'mvpp2', > > >   'netvsc', > > >   'nfp', > > > diff --git a/drivers/net/mlx4/meson.build > > > b/drivers/net/mlx4/meson.build > > > new file mode 100644 > > > index 000000000..debaca5b6 > > > --- /dev/null > > > +++ b/drivers/net/mlx4/meson.build > > > @@ -0,0 +1,94 @@ > > > +# SPDX-License-Identifier: BSD-3-Clause > > > +# Copyright 2018 6WIND S.A. > > > +# Copyright 2018 Mellanox Technologies, Ltd > > > + > > > +# As there is no more configuration file to activate/configure the > > > PMD it will > > > +# use some variables here to configure it. > > > +pmd_dlopen = get_option('enable_driver_mlx4_glue') > > > +build = get_option('enable_driver_mlx4') or pmd_dlopen > > > > As stated above, I believe this should be based upon whether you find > > the > > "mnl", "mlx4" and "ibverbs" libraries. If we start adding back in > > static > > options for every driver, then we'll be back to having a mass of > > config > > options like we had before. > > BTW, slightly related to that: ibverbs doesn't ship pkg-config files at > the moment which makes the detection slightly more awkward that it > could be, so I've sent a PR upstream to add that: > > https://github.com/linux-rdma/rdma-core/pull/373 > > Hope this can be useful! Thanks Luca, I was also searching for it, you save me some time, I hope this can be backported down to RDMA-Core's stable version v15 of RDMA-Core it would fully help. -- Nélio Laranjeiro 6WIND