From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id C1D711AFF7 for ; Fri, 31 Aug 2018 18:24:53 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id k5-v6so11735036wre.10 for ; Fri, 31 Aug 2018 09:24:53 -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=e6IjxgiN8BYI+NNzs6zqFMylNfDQrA85G68Vqo0CVcw=; b=t+F7jTtJZ7CF/BxEj5s91GM9/pPE9++zrM1GOgJ8B/Vs4w11dcYIZOj8ty6outibo7 gqfn3qFqIzogpzLewCOsAYo/oGynDE0qoO+GvI71nK/AYEMLMIi/Q26R4e3RbRQv053n UrtZEBAmkR93TijQBS4vtxphRuBqtoHtx1ee90LDkaQftUVVGFQlz1o0SV04MGYwi1F5 /daaC0vxXMQ1AZwovLWFX7+rTo8h8Y6FRnafMCSKypS0OmKvLnyt9HmDAbOj+NisuOL2 9tfWLzgjfSoeQ+RyR4z7TSvguAGC9qvPAIBBzRaeNp1UawxJq81RnGIiUg/L2e4kHkdY kUbA== X-Gm-Message-State: APzg51CxmB+Gjggd1LU2WeQEKhNyDugp3/djHGz7AYXBB7EwLwZtpSTl Xn/DsTTWDoJ6Bl4W4TVBiMc= X-Google-Smtp-Source: ANB0VdasDASzeFsg8Q2vHQBMhSyvAq6B+psj13Ed6s6SwBRuOKiNl1giqIfrxRWoLf8AmI5IrX2/cQ== X-Received: by 2002:a5d:6aca:: with SMTP id u10-v6mr11814991wrw.44.1535732693452; Fri, 31 Aug 2018 09:24:53 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id o15-v6sm9078294wru.23.2018.08.31.09.24.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 Aug 2018 09:24:52 -0700 (PDT) Message-ID: <1535732691.11823.34.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: Fri, 31 Aug 2018 17:24:51 +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: Fri, 31 Aug 2018 16:24:53 -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. This was merged now, so if you want it backported you can ask the maintainers if it would be fine to do so. --=20 Kind regards, Luca Boccassi