Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104469/?format=api
http://patchwork.dpdk.org/api/patches/104469/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211117112847.7362-6-david.marchand@redhat.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20211117112847.7362-6-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211117112847.7362-6-david.marchand@redhat.com", "date": "2021-11-17T11:28:47", "name": "[v2,5/5] build: select optional libraries", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ec558a478a8e721e052568491a87cfe8fa5ad908", "submitter": { "id": 1173, "url": "http://patchwork.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20211117112847.7362-6-david.marchand@redhat.com/mbox/", "series": [ { "id": 20618, "url": "http://patchwork.dpdk.org/api/series/20618/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20618", "date": "2021-11-17T11:28:42", "name": "Extend optional libraries list", "version": 2, "mbox": "http://patchwork.dpdk.org/series/20618/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/104469/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/104469/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CAB8CA0C41;\n\tWed, 17 Nov 2021 12:30:59 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B4824426DD;\n\tWed, 17 Nov 2021 12:30:59 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id AFBE5426D5\n for <dev@dpdk.org>; Wed, 17 Nov 2021 12:30:57 +0100 (CET)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-19-cxX8JfxGPt2KyhGQSQ93cA-1; Wed, 17 Nov 2021 06:30:54 -0500", "from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com\n [10.5.11.23])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B52461006AA0;\n Wed, 17 Nov 2021 11:30:52 +0000 (UTC)", "from dmarchan.remote.csb (unknown [10.40.192.8])\n by smtp.corp.redhat.com (Postfix) with ESMTP id A4A359329;\n Wed, 17 Nov 2021 11:30:49 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1637148657;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=Z/y5opQLD6rkmw7+UdV0i3a+Igjd/TEA7TSAOIQKldg=;\n b=Ef1Tn+QSxTZSBxn+oh8Pj9fXh1ia/WehBuyqilWABGgpIxb/y2vYLGuZ/zVnf/kwE9S07o\n 9sdzRFUbTJWvrVkRd4+eO0D28W/Nm9jsdcr7Al9i7al5GOuDAPFWU99PU4CRphniHxtSOh\n XOjiDvibBAXNvB2fb7bOGi08Nb/9e2I=", "X-MC-Unique": "cxX8JfxGPt2KyhGQSQ93cA-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "bruce.richardson@intel.com, thomas@monjalon.net, bluca@debian.org,\n tredaelli@redhat.com, i.maximets@ovn.org, james.r.harris@intel.com,\n mohammed@hawari.fr", "Subject": "[PATCH v2 5/5] build: select optional libraries", "Date": "Wed, 17 Nov 2021 12:28:47 +0100", "Message-Id": "<20211117112847.7362-6-david.marchand@redhat.com>", "In-Reply-To": "<20211117112847.7362-1-david.marchand@redhat.com>", "References": "<20211110164814.5231-1-david.marchand@redhat.com>\n <20211117112847.7362-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.23", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "There is currently no way to know which libraries are optional.\nIntroduce a enable_libs option (close to what we have for drivers) so\nthat packagers or projects consuming DPDK can more easily select the\noptional libraries that matter to them and disable other optional\nlibraries.\n\nNote: the enabled_libs variable is renamed for sake of consistency.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n buildtools/chkincs/meson.build | 2 +-\n lib/meson.build | 34 ++++++++++++++++++----------------\n meson.build | 3 ++-\n meson_options.txt | 2 ++\n 4 files changed, 23 insertions(+), 18 deletions(-)", "diff": "diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build\nindex 5ffca89761..6b93d5f46c 100644\n--- a/buildtools/chkincs/meson.build\n+++ b/buildtools/chkincs/meson.build\n@@ -18,7 +18,7 @@ sources = files('main.c')\n sources += gen_c_files.process(dpdk_chkinc_headers)\n \n deps = []\n-foreach l:enabled_libs\n+foreach l:dpdk_libs_enabled\n deps += get_variable('static_rte_' + l)\n endforeach\n \ndiff --git a/lib/meson.build b/lib/meson.build\nindex dad9fce14d..47c857c0fc 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -78,17 +78,10 @@ optional_libs = [\n 'vhost',\n ]\n \n-disabled_libs = []\n-opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'),\n+enable_libs = run_command(list_dir_globs, get_option('enable_libs'),\n+ check: true).stdout().split()\n+disable_libs = run_command(list_dir_globs, get_option('disable_libs'),\n check: true).stdout().split()\n-foreach l:opt_disabled_libs\n- if not optional_libs.contains(l)\n- warning('Cannot disable mandatory library \"@0@\"'.format(l))\n- continue\n- endif\n- disabled_libs += l\n-endforeach\n-\n \n default_cflags = machine_args\n default_cflags += ['-DALLOW_EXPERIMENTAL_API']\n@@ -98,8 +91,6 @@ if cc.has_argument('-Wno-format-truncation')\n default_cflags += '-Wno-format-truncation'\n endif\n \n-enabled_libs = [] # used to print summary at the end\n-\n foreach l:libraries\n build = true\n reason = '<unknown reason>' # set if build == false to explain why\n@@ -123,10 +114,21 @@ foreach l:libraries\n deps += ['eal']\n endif\n \n- if disabled_libs.contains(l)\n- build = false\n- reason = 'explicitly disabled via build config'\n+ if optional_libs.contains(l)\n+ # check for enabled libraries only if one is set in config\n+ if enable_libs.length() != 0 and not enable_libs.contains(l)\n+ build = false\n+ reason = 'not in enabled libraries build config'\n+ elif disable_libs.contains(l)\n+ build = false\n+ reason = 'explicitly disabled via build config'\n+ endif\n else\n+ if disable_libs.contains(l)\n+ warning('Cannot disable mandatory library \"@0@\"'.format(l))\n+ endif\n+ endif\n+ if build\n subdir(l)\n endif\n if name != l\n@@ -150,7 +152,7 @@ foreach l:libraries\n static_deps += [get_variable('static_rte_' + d)]\n endforeach\n \n- enabled_libs += name\n+ dpdk_libs_enabled += name\n dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)\n install_headers(headers)\n install_headers(indirect_headers)\ndiff --git a/meson.build b/meson.build\nindex 12cb6e0e83..65855ceee8 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -35,6 +35,7 @@ dpdk_driver_classes = []\n dpdk_drivers = []\n dpdk_extra_ldflags = []\n dpdk_libs_disabled = []\n+dpdk_libs_enabled = []\n dpdk_drvs_disabled = []\n abi_version_file = files('ABI_VERSION')\n \n@@ -102,7 +103,7 @@ subdir('buildtools/pkg-config')\n output_message = '\\n=================\\nLibraries Enabled\\n=================\\n'\n output_message += '\\nlibs:\\n\\t'\n output_count = 0\n-foreach lib:enabled_libs\n+foreach lib:dpdk_libs_enabled\n output_message += lib + ', '\n output_count += 1\n if output_count == 8\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 7c220ad68d..ccb92cff7a 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -16,6 +16,8 @@ option('enable_docs', type: 'boolean', value: false, description:\n 'build documentation')\n option('enable_drivers', type: 'string', value: '', description:\n 'Comma-separated list of drivers to build. If unspecified, build all drivers.')\n+option('enable_libs', type: 'string', value: '', description:\n+ 'Comma-separated list of libraries to explicitly enable.')\n option('enable_driver_sdk', type: 'boolean', value: false, description:\n 'Install headers to build drivers.')\n option('enable_kmods', type: 'boolean', value: false, description:\n", "prefixes": [ "v2", "5/5" ] }{ "id": 104469, "url": "