From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 11EDF3772 for ; Wed, 29 Aug 2018 12:00:57 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id v16-v6so4207505wro.11 for ; Wed, 29 Aug 2018 03:00:57 -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=k4P1d6XsIFOgnwsKODPo7Xho1O1oc/2l1wzGX5/uzBs=; b=sgbikNn6lp4nwbLh8yGETefSI59NKayUd/06zJmzQkg3YVjM3rhExNrifXT1q8EC6+ XGrJI51BCgs92ngY7Q7FVGQIIf0Mum8kkxzlLeFGSdeD8Zj/f8xhumCwXhpsdO2pRxJ3 v1AGE0TIHudjsA6LuuMv7L7lNLMRoBu8kZ2eq7tW816h2UEEalSKt0tHZ6+OKWxwP4iR a7m+NQonOlUU3192VTUzloVQN8Lm9YBuBenxj+tLzJuXv+pcO6J1F2TGaKiSfxiiebjC CMNz70hj3iM7Psera1kTxbjeXvxa98BAo3L/84Ixhzu5UNtLXZg3Llo+rN6hEw/i5Bth eSIg== X-Gm-Message-State: APzg51BnU0ki+6Z5sb6x2KwWysKOrlEeASwXOyPuySQLInYd0PRGqM5A H2tR+UtQhx5rRu2SSHgQhDk= X-Google-Smtp-Source: ANB0VdaDKA/rBc41LK+Dd6lDQHY4X6YmGbjLEej9/caDcPuJNSAANFvL/QQ3h/eycRc+Zd8jjLdtXA== X-Received: by 2002:adf:ffc7:: with SMTP id x7-v6mr3940172wrs.137.1535536856776; Wed, 29 Aug 2018 03:00:56 -0700 (PDT) Received: from localhost ([2001:1be0:110d:fcfe:41aa:5bfa:6cf3:7531]) by smtp.gmail.com with ESMTPSA id i125-v6sm6390410wmd.23.2018.08.29.03.00.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 03:00:55 -0700 (PDT) Message-ID: <1535536854.1113.33.camel@debian.org> From: Luca Boccassi To: Bruce Richardson , Nelio Laranjeiro Cc: dev@dpdk.org, Yongseok Koh , Shahaf Shuler , Matan Azrad Date: Wed, 29 Aug 2018 11:00:54 +0100 In-Reply-To: <20180828154500.GA4208@bricha3-MOBL.ger.corp.intel.com> References: <7812af2267017898332783e934bef9478814ae96.1535361299.git.nelio.laranjeiro@6wind.com> <85a2b398fecdf917dc22810ea0974a91ccca1d13.1535373640.git.nelio.laranjeiro@6wind.com> <20180828154500.GA4208@bricha3-MOBL.ger.corp.intel.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 10:00:57 -0000 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=A0When= 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. 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! --=20 Kind regards, Luca Boccassi