From patchwork Wed May 29 16:39:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 53855 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D6071B95D; Wed, 29 May 2019 18:40:11 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 1B0D91B956 for ; Wed, 29 May 2019 18:40:08 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190529164007euoutp02d3253b6b96b85fa072773248bde9e7a9~jNNpA_QFv2258622586euoutp02O for ; Wed, 29 May 2019 16:40:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190529164007euoutp02d3253b6b96b85fa072773248bde9e7a9~jNNpA_QFv2258622586euoutp02O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1559148008; bh=fuIVcKPPXHF/fkWrEL9v7X8LuWw2qxpn1agTeV99i7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DmJLBwD6rmOjEXjbVsT8G2VlxG6A2gdVXw83uSt8GQupkmnwW+RbKf12KLxXz4Y+S InyWAHoUwP2ecx40mUClZrt3oIMRNEU8488REyIshphdjwQ71YbF89t3mGUVsyNIs9 x69spJTPI3dZWrL8pCtNGFFnab2j20Pt1Y7etFWk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190529164007eucas1p1135e0485b091382ecc425a8bd6702606~jNNohNeQB0827108271eucas1p11; Wed, 29 May 2019 16:40:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 50.80.04325.7E5BEEC5; Wed, 29 May 2019 17:40:07 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190529164006eucas1p296e902a46cb3ef7ac436d619f9e55d5b~jNNnrIqqz0279902799eucas1p2f; Wed, 29 May 2019 16:40:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190529164006eusmtrp1f6e2591dfb7d9870756b0362d995decf~jNNnbmH4a1240812408eusmtrp1H; Wed, 29 May 2019 16:40:06 +0000 (GMT) X-AuditID: cbfec7f5-b8fff700000010e5-bf-5ceeb5e783c0 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id FF.22.04140.6E5BEEC5; Wed, 29 May 2019 17:40:06 +0100 (BST) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190529164005eusmtip205d16f43fcd3d63727633d6df9ffe153~jNNm-t0Rf2748427484eusmtip2C; Wed, 29 May 2019 16:40:05 +0000 (GMT) From: Ilya Maximets To: dev@dpdk.org, Thomas Monjalon Cc: Bruce Richardson , Aaron Conole , Kevin Traynor , Ilya Maximets Date: Wed, 29 May 2019 19:39:57 +0300 Message-Id: <20190529163958.30796-2-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190529163958.30796-1-i.maximets@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOIsWRmVeSWpSXmKPExsWy7djP87rPt76LMTi8j93i15sH7BY3Vtlb vPu0ncniSvtPdou1hz6wW3x6cILFgc3j14KlrB6L97xk8jh2cxq7x/t9V9k8+rasYgxgjeKy SUnNySxLLdK3S+DK6H8zm6lgOX9F+8E1bA2MX3i6GDk5JARMJJ4v2sLaxcjFISSwglFi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R36ygSSEBfwk3h37zwRiswio Smw+dBRsKq+AtcSq/81MEBvkJVZvOMAMYnMK2Eg0ts9gg7jIWqJhxz7mCYx8CxgZVjGKpJYW 56bnFhvpFSfmFpfmpesl5+duYgSG6rZjP7fsYOx6F3yIUYCDUYmHd0L+uxgh1sSy4srcQ4wS HMxKIrw/lwOFeFMSK6tSi/Lji0pzUosPMZoCHTWRWUo0OR8YR3kl8YamhuYWlobmxubGZhZK 4rwdAgdjhATSE0tSs1NTC1KLYPqYODilGhib1y89XVejcHL6rPX2zb7RyjGCj6O1434q5U24 mL4rzuxBi+Qq/d6c7e815MW6uWPiLqwKWWgc0WtwR7sqUi35ETefdu7qx+fSd090CJz1qECt 6IRBceiUDc6KL/JSLrjIG9W8S17+59KVBy2vn198Zn59B1uf6UG5pe+3t5qy50kmP2t6UaXE UpyRaKjFXFScCAC2yzCaawIAAA== X-CMS-MailID: 20190529164006eucas1p296e902a46cb3ef7ac436d619f9e55d5b X-Msg-Generator: CA X-RootMTR: 20190529164006eucas1p296e902a46cb3ef7ac436d619f9e55d5b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190529164006eucas1p296e902a46cb3ef7ac436d619f9e55d5b References: <20190529163958.30796-1-i.maximets@samsung.com> Subject: [dpdk-dev] [PATCH 1/2] meson: don't check dependencies for tests if not required 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" Don't need to check dependencies if test apps will not be built anyway. Signed-off-by: Ilya Maximets --- app/test/meson.build | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 83391cef0..7a529b644 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -313,29 +313,29 @@ endif # specify -D_GNU_SOURCE unconditionally cflags += '-D_GNU_SOURCE' -test_dep_objs = [] -if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') - compress_test_dep = dependency('zlib', required: false) - if compress_test_dep.found() - test_dep_objs += compress_test_dep - test_sources += 'test_compressdev.c' - test_deps += 'compressdev' - fast_non_parallel_test_names += 'compressdev_autotest' +if get_option('tests') + test_dep_objs = [] + if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') + compress_test_dep = dependency('zlib', required: false) + if compress_test_dep.found() + test_dep_objs += compress_test_dep + test_sources += 'test_compressdev.c' + test_deps += 'compressdev' + fast_non_parallel_test_names += 'compressdev_autotest' + endif endif -endif -foreach d:test_deps - def_lib = get_option('default_library') - test_dep_objs += get_variable(def_lib + '_rte_' + d) -endforeach -test_dep_objs += cc.find_library('execinfo', required: false) + foreach d:test_deps + def_lib = get_option('default_library') + test_dep_objs += get_variable(def_lib + '_rte_' + d) + endforeach + test_dep_objs += cc.find_library('execinfo', required: false) -link_libs = [] -if get_option('default_library') == 'static' - link_libs = dpdk_drivers -endif + link_libs = [] + if get_option('default_library') == 'static' + link_libs = dpdk_drivers + endif -if get_option('tests') dpdk_test = executable('dpdk-test', test_sources, link_whole: link_libs, From patchwork Wed May 29 16:39:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 53856 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB79C1B99C; Wed, 29 May 2019 18:40:13 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 010C21B994 for ; Wed, 29 May 2019 18:40:11 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190529164011euoutp023607183e2d4bcd0b60772f9b16c2d317~jNNsL9YxP2164321643euoutp02C for ; Wed, 29 May 2019 16:40:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190529164011euoutp023607183e2d4bcd0b60772f9b16c2d317~jNNsL9YxP2164321643euoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1559148011; bh=s+IvAWSFy+yuXI1GJG2F084KT+yo7LE/hJpPZX8UYrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LPxcvdLYqDbPQU9TDLAYqorUtxMXINXcS72Lb1y1kVPTbzZrEY77rKQ4a9944tlB8 ksbjstfi+uOlYcdlqgGXQ+Ky814iP5lMALdSc6QrrWUvH9wpiRpAEh62ivcsFVdHaf 3HBhV3XvVMDGoZtevvmXeefVaqUfRo/QiZUI8i+4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190529164010eucas1p2458fe03b290038e1216190dd470edfe8~jNNq8OwBK1121311213eucas1p2U; Wed, 29 May 2019 16:40:10 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id E0.80.04325.9E5BEEC5; Wed, 29 May 2019 17:40:09 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190529164009eucas1p289f1dcf87012ecf049efc8eee2c2ea9d~jNNqFODH71120411204eucas1p2U; Wed, 29 May 2019 16:40:09 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190529164008eusmtrp2dc469d9276c4b48c9b8ea238facc0ae0~jNNp1vYcc1254912549eusmtrp2i; Wed, 29 May 2019 16:40:08 +0000 (GMT) X-AuditID: cbfec7f5-b8fff700000010e5-c3-5ceeb5e964a5 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 9E.65.04146.8E5BEEC5; Wed, 29 May 2019 17:40:08 +0100 (BST) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190529164008eusmtip208b8aaf7d54673b673e4c592397fe5eb~jNNpXSenF2645126451eusmtip2o; Wed, 29 May 2019 16:40:08 +0000 (GMT) From: Ilya Maximets To: dev@dpdk.org, Thomas Monjalon Cc: Bruce Richardson , Aaron Conole , Kevin Traynor , Ilya Maximets Date: Wed, 29 May 2019 19:39:58 +0300 Message-Id: <20190529163958.30796-3-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190529163958.30796-1-i.maximets@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsWy7djPc7ovt76LMTjar2Px680Ddosbq+wt 3n3azmRxpf0nu8XaQx/YLT49OMHiwObxa8FSVo/Fe14yeRy7OY3d4/2+q2wefVtWMQawRnHZ pKTmZJalFunbJXBlXPy+k6VgakLF42dlDYzH/LoYOTkkBEwkFv/fy97FyMUhJLCCUeLXvJlM EM4XRokDH5ZCOZ8ZJf4eusMO09Kx5h5Uy3JGidUfj7CCJIQEfjBKNE7kBbHZBHQkTq0+wghi iwiYS0yc0MkK0sAssJRRYvv6N8xdjBwcwgLGEnsWsIHUsAioSqy+cJINJMwrYC3xqtEKYpe8 xOoNB5hBbE4BG4nG9hlsIGMkBJ6zScyfv5gJpF5CwEVi42sLiHphiVfHt0DdKSPxf+d8Jgi7 XuJ+y0tGiN4ORonph/5BJewltrw+xw4yh1lAU2L9Ln2IkY4SM7vdIUw+iRtvBUGKmYHMSdum M0OEeSU62oQgZqhI/D64nBnClpK4+e4z1AEeEvuWr4QGVD+jRF/bZJYJjPKzEHYtYGRcxSie Wlqcm55abJyXWq5XnJhbXJqXrpecn7uJEZgSTv87/nUH474/SYcYBTgYlXh4J+S/ixFiTSwr rsw9x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Z0fpaiaU4 I9FQi7moOBEAjyvVTGkCAAA= X-CMS-MailID: 20190529164009eucas1p289f1dcf87012ecf049efc8eee2c2ea9d X-Msg-Generator: CA X-RootMTR: 20190529164009eucas1p289f1dcf87012ecf049efc8eee2c2ea9d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190529164009eucas1p289f1dcf87012ecf049efc8eee2c2ea9d References: <20190529163958.30796-1-i.maximets@samsung.com> Subject: [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" 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. 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. Another thing is the binary size. Number of DPDK libraries and, as a result, size of resulted statically linked application decreases significantly. 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. Also, I have to note that less code means less probability of failures and less number of attack vectors. 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. For example, following cmdline could be used to build almost minimal set of DPDK libs and drivers to check OVS build: $ meson build -Dexamples='' -Dtests=false -Denable_kmods=false \ -Ddrivers_bus=pci,vdev \ -Ddrivers_mempool=ring \ -Ddrivers_net=null,virtio,ring \ -Ddrivers_crypto=virtio \ -Ddrivers_compress=none \ -Ddrivers_event=none \ -Ddrivers_baseband=none \ -Ddrivers_raw=none \ -Ddrivers_common=none \ -Dlibs=kvargs,eal,cmdline,ring,mempool,mbuf,net,meter,\ ethdev,pci,hash,cryptodev,pdump,vhost \ -Dapps=none Adding a few real net drivers will give configuration that can be used in production environment. Looks not very pretty, but this could be moved to a script. Build details: Build targets in project: 57 $ time ninja real 0m11,528s user 1m4,137s sys 0m4,935s $ du -sh ../dpdk_meson_install/ 3,5M ../dpdk_meson_install/ To compare with what we have without these options: $ meson build -Dexamples='' -Dtests=false -Denable_kmods=false Build targets in project: 434 $ time ninja real 1m38,963s user 10m18,624s sys 0m45,478s $ du -sh ../dpdk_meson_install/ 27M ../dpdk_meson_install/ 10x speed up for the user time. 7.7 times size decrease. 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. Signed-off-by: Ilya Maximets Acked-by: Michael Santana --- app/meson.build | 5 +++++ drivers/baseband/meson.build | 5 +++++ drivers/bus/meson.build | 6 ++++++ drivers/common/meson.build | 6 ++++++ drivers/compress/meson.build | 5 +++++ drivers/crypto/meson.build | 5 +++++ drivers/event/meson.build | 6 ++++++ drivers/mempool/meson.build | 6 ++++++ drivers/net/meson.build | 6 ++++++ drivers/raw/meson.build | 6 ++++++ lib/meson.build | 5 +++++ meson_options.txt | 22 ++++++++++++++++++++++ 12 files changed, 83 insertions(+) diff --git a/app/meson.build b/app/meson.build index 2b9fdef74..48972954c 100644 --- a/app/meson.build +++ b/app/meson.build @@ -17,6 +17,11 @@ apps = [ 'test-pipeline', 'test-pmd'] +enabled_apps = get_option('apps') +if enabled_apps != 'all' + apps = (enabled_apps == 'none') ? [] : enabled_apps.split(',') +endif + # for BSD only lib_execinfo = cc.find_library('execinfo', required: false) diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build index 52489df35..fabc80fc2 100644 --- a/drivers/baseband/meson.build +++ b/drivers/baseband/meson.build @@ -3,5 +3,10 @@ drivers = ['null'] +enabled_drivers = get_option('drivers_baseband') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@' diff --git a/drivers/bus/meson.build b/drivers/bus/meson.build index 80de2d91d..d1400ff28 100644 --- a/drivers/bus/meson.build +++ b/drivers/bus/meson.build @@ -2,6 +2,12 @@ # Copyright(c) 2017 Intel Corporation drivers = ['dpaa', 'fslmc', 'ifpga', 'pci', 'vdev', 'vmbus'] + +enabled_drivers = get_option('drivers_bus') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + std_deps = ['eal'] config_flag_fmt = 'RTE_LIBRTE_@0@_BUS' driver_name_fmt = 'rte_bus_@0@' diff --git a/drivers/common/meson.build b/drivers/common/meson.build index a50934108..311511365 100644 --- a/drivers/common/meson.build +++ b/drivers/common/meson.build @@ -3,5 +3,11 @@ std_deps = ['eal'] drivers = ['cpt', 'dpaax', 'mvep', 'octeontx', 'qat'] + +enabled_drivers = get_option('drivers_common') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON' driver_name_fmt = 'rte_common_@0@' diff --git a/drivers/compress/meson.build b/drivers/compress/meson.build index 817ef3be4..5585ec537 100644 --- a/drivers/compress/meson.build +++ b/drivers/compress/meson.build @@ -3,6 +3,11 @@ drivers = ['isal', 'octeontx', 'qat', 'zlib'] +enabled_drivers = get_option('drivers_compress') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + std_deps = ['compressdev'] # compressdev pulls in all other needed deps config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@' diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build index 83e78860e..7b1363f23 100644 --- a/drivers/crypto/meson.build +++ b/drivers/crypto/meson.build @@ -5,6 +5,11 @@ drivers = ['aesni_gcm', 'aesni_mb', 'caam_jr', 'ccp', 'dpaa_sec', 'dpaa2_sec', 'kasumi', 'mvsam', 'null', 'octeontx', 'openssl', 'qat', 'scheduler', 'snow3g', 'virtio', 'zuc'] +enabled_drivers = get_option('drivers_crypto') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@' diff --git a/drivers/event/meson.build b/drivers/event/meson.build index fb723f727..14e0c68ac 100644 --- a/drivers/event/meson.build +++ b/drivers/event/meson.build @@ -6,6 +6,12 @@ if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and dpdk_conf.has('RTE_ARCH_ARM64')) drivers += 'octeontx' endif + +enabled_drivers = get_option('drivers_event') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + std_deps = ['eventdev', 'kvargs'] config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD' driver_name_fmt = 'rte_pmd_@0@_event' diff --git a/drivers/mempool/meson.build b/drivers/mempool/meson.build index 4527d9806..cfacedd1b 100644 --- a/drivers/mempool/meson.build +++ b/drivers/mempool/meson.build @@ -2,6 +2,12 @@ # Copyright(c) 2017 Intel Corporation drivers = ['bucket', 'dpaa', 'dpaa2', 'octeontx', 'ring', 'stack'] + +enabled_drivers = get_option('drivers_mempool') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + std_deps = ['mempool'] config_flag_fmt = 'RTE_LIBRTE_@0@_MEMPOOL' driver_name_fmt = 'rte_mempool_@0@' diff --git a/drivers/net/meson.build b/drivers/net/meson.build index ed99896c3..901be5eac 100644 --- a/drivers/net/meson.build +++ b/drivers/net/meson.build @@ -42,6 +42,12 @@ drivers = ['af_packet', 'virtio', 'vmxnet3', ] + +enabled_drivers = get_option('drivers_net') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std std_deps += ['bus_vdev'] # same with vdev bus diff --git a/drivers/raw/meson.build b/drivers/raw/meson.build index a61cdccef..ca98e92f0 100644 --- a/drivers/raw/meson.build +++ b/drivers/raw/meson.build @@ -2,6 +2,12 @@ # Copyright 2018 NXP drivers = ['skeleton_rawdev', 'dpaa2_cmdif', 'dpaa2_qdma', 'ifpga_rawdev'] + +enabled_drivers = get_option('drivers_raw') +if enabled_drivers != 'all' + drivers = (enabled_drivers == 'none') ? [] : enabled_drivers.split(',') +endif + std_deps = ['rawdev'] config_flag_fmt = 'RTE_LIBRTE_PMD_@0@_RAWDEV' driver_name_fmt = 'rte_pmd_@0@' diff --git a/lib/meson.build b/lib/meson.build index e067ce5ea..384867926 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -34,6 +34,11 @@ if is_windows libraries = ['kvargs','eal'] # only supported libraries for windows endif +enabled_libs = get_option('libs') +if enabled_libs != 'all' + libraries = (enabled_libs == 'none') ? [] : enabled_libs.split(',') +endif + default_cflags = machine_args if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' diff --git a/meson_options.txt b/meson_options.txt index 16d9f92c6..5184917b0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,6 +2,26 @@ option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') +option('apps', type: 'string', value: 'all', + description: 'List of applications to build. Defaults to all') +option('drivers_baseband', type: 'string', value: 'all', + description: 'List of baseband drivers to build. Defaults to all') +option('drivers_bus', type: 'string', value: 'all', + description: 'List of bus drivers to build. Defaults to all') +option('drivers_common', type: 'string', value: 'all', + description: 'List of common drivers to build. Defaults to all') +option('drivers_compress', type: 'string', value: 'all', + description: 'List of compress drivers to build. Defaults to all') +option('drivers_crypto', type: 'string', value: 'all', + description: 'List of crypto drivers to build. Defaults to all') +option('drivers_event', type: 'string', value: 'all', + description: 'List of event drivers to build. Defaults to all') +option('drivers_mempool', type: 'string', value: 'all', + description: 'List of mempool drivers to build. Defaults to all') +option('drivers_net', type: 'string', value: 'all', + description: 'List of net drivers to build. Defaults to all') +option('drivers_raw', type: 'string', value: 'all', + description: 'List of rawdev drivers to build. Defaults to all') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') option('enable_docs', type: 'boolean', value: false, @@ -16,6 +36,8 @@ option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers') option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules, they will be installed in $DEST_DIR/$kernel_dir/../extra/dpdk') +option('libs', type: 'string', value: 'all', + description: 'List of libraries to build. Defaults to all') option('lib_musdk_dir', type: 'string', value: '', description: 'path to the MUSDK library installation directory') option('machine', type: 'string', value: 'native',