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 2F00BF11 for ; Wed, 29 Aug 2018 14:28:30 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id f21-v6so5097997wmc.5 for ; Wed, 29 Aug 2018 05:28:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=R84fs5NxtcSbV2G6WRFo5doqJ5uIa3zbH0vjNaS/rgU=; b=HQlBolFG3R0Kq8iuDqybXULeDHrpc08eV8UL64u0iKs/MKQlkApKVDuPpzvBveGNmI 2PflOW+mjh1P0yFCN0jp1BEx682TgaPzTLa1t+xS4Wv6LmA/6JfvKiGJrjnzT6Rj414i ottRtDFNmNp4m+hI6rgTxZRlDIkEVZteJ1Mycm/KP5Df+eA9DKy+07bIlLfqigWRrhLS sFVAjuV0h8wOoRZ1cX/v5HGj5Mmak1Kt7pLcYC9819iRI1whJglYwLJTYBoWdXoXhGC0 3DdL4/MHIbJOWn4uNHU0vJ5YRwlK90ZWSlwx6/m8FcmAwOI+BjMVv4f+FW7Q5m2LWWrU AsUQ== X-Gm-Message-State: APzg51C+uZt7wg8PbfF6T38a37y1ny4JdmRYup9/ZEjiO01xlyiKbfpE x/wG6/36Oo9UkmBzD6Yrmyc= X-Google-Smtp-Source: ANB0VdbP11q4JQepaa8e3r6yA1oeO+bKr34poVaIched7fJzWZovnDVbZYttvjl5COnIkfu9k9QuTA== X-Received: by 2002:a1c:3743:: with SMTP id e64-v6mr4075632wma.63.1535545709646; Wed, 29 Aug 2018 05:28:29 -0700 (PDT) Received: from localhost ([2001:1be0:110d:fcfe:41aa:5bfa:6cf3:7531]) by smtp.gmail.com with ESMTPSA id r1-v6sm3585438wmg.9.2018.08.29.05.28.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 05:28:28 -0700 (PDT) Message-ID: <1535545707.11823.0.camel@debian.org> From: Luca Boccassi To: =?ISO-8859-1?Q?N=E9lio?= Laranjeiro Cc: Bruce Richardson , dev@dpdk.org, Yongseok Koh , Shahaf Shuler , Matan Azrad Date: Wed, 29 Aug 2018 13:28:27 +0100 In-Reply-To: <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> <20180829115942.iog3bk4xkmi3newe@laranjeiro-vm.dev.6wind.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 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 12:28:30 -0000 On Wed, 2018-08-29 at 13:59 +0200, N=C3=A9lio Laranjeiro wrote: > 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. > > >=20 > > > /Bruce > > >=20 > > > 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.=C2=A0=C2=A0They can be enabled through: > > > > - enable_driver_mlx{4,5}=3Dtrue or > > > > - enable_driver_mlx{4,5}_glue=3Dtrue > > > > depending on the needs. > > >=20 > > > 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. > > >=20 > > > >=20 > > > > 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. > > > >=20 > > > > Meson will try to find the required external libraries.=C2=A0=C2=A0= 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): > > > >=20 > > > > =C2=A0# CLFAGS=3D-I/tmp/rdma-core/build/include \ > > > > =C2=A0=C2=A0=C2=A0LDFLAGS=3D-L/tmp/rdma-core/build/lib \ > > > > =C2=A0=C2=A0=C2=A0LD_LIBRARY_PATH=3D/tmp/rdma-core/build/lib \ > > > > =C2=A0=C2=A0=C2=A0meson -Denable_driver_mlx4=3Dtrue output > > > >=20 > > > > =C2=A0# CLFAGS=3D-I/tmp/rdma-core/build/include \ > > > > =C2=A0=C2=A0=C2=A0LDFLAGS=3D-L/tmp/rdma-core/build/lib \ > > > > =C2=A0=C2=A0=C2=A0LD_LIBRARY_PATH=3D/tmp/rdma-core/build/lib \ > > > > =C2=A0=C2=A0=C2=A0ninja -C output install > > >=20 > > > 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! :- > > > ) > > >=20 > > > >=20 > > > > Signed-off-by: Nelio Laranjeiro > > > >=20 > > > > --- > > > >=20 > > > > Changes in v2: > > > >=20 > > > > - dropped patch https://patches.dpdk.org/patch/43897/ > > > > - remove extra_{cflags,ldflags} as already honored by meson > > > > through > > > > environment variables. > > > > --- > > > > =C2=A0drivers/net/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|= =C2=A0=C2=A0=C2=A02 + > > > > =C2=A0drivers/net/mlx4/meson.build |=C2=A0=C2=A094 ++++++ > > > > =C2=A0drivers/net/mlx5/meson.build | 545 > > > > +++++++++++++++++++++++++++++++++++ > > > > =C2=A0meson_options.txt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A0=C2=A08 + > > > > =C2=A04 files changed, 649 insertions(+) > > > > =C2=A0create mode 100644 drivers/net/mlx4/meson.build > > > > =C2=A0create mode 100644 drivers/net/mlx5/meson.build > > > >=20 > > > > 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 =3D ['af_packet', > > > > =C2=A0 'ixgbe', > > > > =C2=A0 'kni', > > > > =C2=A0 'liquidio', > > > > + 'mlx4', > > > > + 'mlx5', > > > > =C2=A0 'mvpp2', > > > > =C2=A0 'netvsc', > > > > =C2=A0 '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 =3D get_option('enable_driver_mlx4_glue') > > > > +build =3D get_option('enable_driver_mlx4') or pmd_dlopen > > >=20 > > > 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. > >=20 > > 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: > >=20 > > https://github.com/linux-rdma/rdma-core/pull/373 > >=20 > > Hope this can be useful! >=20 > 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. With a quick glance at the v15 branch, the CMake files look similar enough that it should be pretty straightforward to backport. --=20 Kind regards, Luca Boccassi