From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6F427A045E for ; Wed, 29 May 2019 22:37:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6EFB1B94F; Wed, 29 May 2019 22:37:23 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id DBD5C1B94D for ; Wed, 29 May 2019 22:37:22 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id d17so2521611wmb.3 for ; Wed, 29 May 2019 13:37:22 -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:user-agent:mime-version; bh=99ZZGKpU0kORQfU13eo+9dW5H1mvAWeDPMKdulqwFb4=; b=WlmSuqjqnhHmrYZS1XNjhh2WoCl8fs6mM59gTXZBiPmPgfCriXYr5rg+fBOvLwzB/m QjlDh1vLJZrkxL4XxUuh1g5UykQC8N52RwJGKx43f2hU337Z+RDYYlrGnRIh1iTxrHX4 yWDX6+DBvH1H5x+hLJ8gmbuEnSiGni5ohVZlNoo84m+eTOTUf7iDfztckI0TNVhJ9MJF utoVis/q/IdSF7CxFQHinI76QMjPzZPeKeRMrFN1ZCLI0zI3ex/yEJYr5xRer1eqjbaf 3b5Tm1mjERuqJyIYMBPvc1Zna1klEl/wuRRotmIcowKRmg1TUpxZ/DSSWSmCWQeYyO8D jBUA== X-Gm-Message-State: APjAAAUEktPtgjlRVUB26EIQMglPDutVAQ8uiB4eB0gvTX2WvA1DWy8A Pl8nsQ2km+UzpfHBCDB5y2I= X-Google-Smtp-Source: APXvYqw5wJ/ztid3crJKr7NSqGfE0eWyWcKxmu9VoaqQnKeQ/SeCF+zpHgW66Fk/E4RfPEb3nSQSNw== X-Received: by 2002:a1c:3cc2:: with SMTP id j185mr20591wma.26.1559162242375; Wed, 29 May 2019 13:37:22 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o21sm300845wmc.46.2019.05.29.13.37.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 29 May 2019 13:37:21 -0700 (PDT) Message-ID: <1a07d1cd59d84dce84e56c10fdabf5e5504560a6.camel@debian.org> From: Luca Boccassi To: Ilya Maximets , dev@dpdk.org, Thomas Monjalon Cc: Bruce Richardson , Aaron Conole , Kevin Traynor Date: Wed, 29 May 2019 21:37:20 +0100 In-Reply-To: <20190529163958.30796-3-i.maximets@samsung.com> References: <20190529163958.30796-1-i.maximets@samsung.com> <20190529163958.30796-3-i.maximets@samsung.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/2] meson: make build configurable 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 2019-05-29 at 19:39 +0300, Ilya Maximets wrote: > The first thing many developers do before start building DPDK is > disabling all the not needed divers and libraries. This happens > just because more than a half of DPDK dirvers and libraries are not > needed for the particular reason. For example, you don't need > dpaa*, octeon*, various croypto devices, eventdev, etc. if you're > only want to build OVS for x86_64 with static linking. >=20 > By disabling everything you don't need, build speeds up literally 10x > times. This is important for CI systems. For example, TravisCI wastes > 10 minutes for the default DPDK build just to check linking with OVS. >=20 > Another thing is the binary size. Number of DPDK libraries and, > as a result, size of resulted statically linked application decreases > significantly. >=20 > Important thing also that you're able to not install some > dependencies > if you don't have them on a target platform. Just disable > libs/drivers > that depends on it. Similar thing for the glibc version mismatch > between build and target platforms. >=20 > Also, I have to note that less code means less probability of > failures and less number of attack vectors. >=20 > This patch gives 'meson' the power of configurability that we > have with 'make'. Using new options it's possible to enable just > what you need and nothing more. >=20 > For example, following cmdline could be used to build almost minimal > set of DPDK libs and drivers to check OVS build: >=20 > $ meson build -Dexamples=3D'' -Dtests=3Dfalse -Denable_kmods=3Dfalse \ > -Ddrivers_bus=3Dpci,vdev \ > -Ddrivers_mempool=3Dring \ > -Ddrivers_net=3Dnull,virtio,ring \ > -Ddrivers_crypto=3Dvirtio \ > -Ddrivers_compress=3Dnone \ > -Ddrivers_event=3Dnone \ > -Ddrivers_baseband=3Dnone \ > -Ddrivers_raw=3Dnone \ > -Ddrivers_common=3Dnone \ > =20 > -Dlibs=3Dkvargs,eal,cmdline,ring,mempool,mbuf,net,meter,\ > ethdev,pci,hash,cryptodev,pdump,vhost \ > -Dapps=3Dnone >=20 > Adding a few real net drivers will give configuration that can be > used > in production environment. >=20 > Looks not very pretty, but this could be moved to a script. >=20 > Build details: >=20 > Build targets in project: 57 >=20 > $ time ninja > real 0m11,528s > user 1m4,137s > sys 0m4,935s >=20 > $ du -sh ../dpdk_meson_install/ > 3,5M ../dpdk_meson_install/ >=20 > To compare with what we have without these options: >=20 > $ meson build -Dexamples=3D'' -Dtests=3Dfalse -Denable_kmods=3Dfalse > Build targets in project: 434 >=20 > $ time ninja > real 1m38,963s > user 10m18,624s > sys 0m45,478s >=20 > $ du -sh ../dpdk_meson_install/ > 27M ../dpdk_meson_install/ >=20 > 10x speed up for the user time. > 7.7 times size decrease. >=20 > This is probably not much user-friendly because it's not a Kconfig > and dependency tracking in meson is really poor, so it requires > usually few iterations to pick correct set of libraries to satisfy > all dependencies. However, it's not a big deal. Options intended > for a proficient users who knows what they need. Hi, We talked about this a few times in the past, and it was actually one of the design goals to _avoid_ replicating the octopus-like config system of the makefiles. That's because it makes the test matrix insanely complicated, not to mention the harm to user friendliness, among other things. If someone doesn't want to use a PMD, they can just avoid installing it - it's simple enough. Sorry, but from me it's a very strong NACK. --=20 Kind regards, Luca Boccassi