Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/129107/?format=api
http://patchwork.dpdk.org/api/patches/129107/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230629090459.823130-3-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": "<20230629090459.823130-3-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230629090459.823130-3-david.marchand@redhat.com", "date": "2023-06-29T09:04:59", "name": "[v6,2/2] build: select optional libraries", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f51b2999163c8a170fbb7cbe927e9d355fac8d76", "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/20230629090459.823130-3-david.marchand@redhat.com/mbox/", "series": [ { "id": 28708, "url": "http://patchwork.dpdk.org/api/series/28708/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28708", "date": "2023-06-29T09:04:57", "name": "Select optional libraries", "version": 6, "mbox": "http://patchwork.dpdk.org/series/28708/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/129107/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/129107/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 2FFDB42D8A;\n\tThu, 29 Jun 2023 11:05:47 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3B8AD42C4D;\n\tThu, 29 Jun 2023 11:05:40 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 544E842D0E\n for <dev@dpdk.org>; Thu, 29 Jun 2023 11:05:39 +0200 (CEST)", "from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com\n [66.187.233.73]) 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-256-F5l5FQtjM0qWyszG4t0GvA-1; Thu, 29 Jun 2023 05:05:35 -0400", "from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com\n [10.11.54.3])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C28F282CCB4;\n Thu, 29 Jun 2023 09:05:35 +0000 (UTC)", "from dmarchan.redhat.com (unknown [10.45.224.210])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 7FEEC1121315;\n Thu, 29 Jun 2023 09:05:33 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1688029538;\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=b3zetaS6+4eG3/99t4CjmR3rqno7RB6KahKwE3RBHS8=;\n b=H6vAeLHoAJRO1UEr0TxRms/LS75F7L88A/TY2FEI8OqwaK9t01spcMH8TeyYaidCCHgdmn\n dpsjvq7z22dReRBZQMXWXHnPaYoO+UjXDK59SLx47/1HyJYjbCjLBnSWgcMjoa6XboliBh\n Fbma/GyUIV+2kz4hSAxxFToDZ62TRl4=", "X-MC-Unique": "F5l5FQtjM0qWyszG4t0GvA-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, bluca@debian.org, tredaelli@redhat.com,\n i.maximets@ovn.org, james.r.harris@intel.com, mohammed@hawari.fr,\n\t=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Bruce Richardson <bruce.richardson@intel.com>", "Subject": "[PATCH v6 2/2] build: select optional libraries", "Date": "Thu, 29 Jun 2023 11:04:59 +0200", "Message-Id": "<20230629090459.823130-3-david.marchand@redhat.com>", "In-Reply-To": "<20230629090459.823130-1-david.marchand@redhat.com>", "References": "<20230629090459.823130-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.3", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "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\nSigned-off-by: David Marchand <david.marchand@redhat.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\n---\nChanges since v4:\n- moved always_enable earlier for readability,\n\nChanges since v3:\n- split non related cleanup changes,\n- fixed false positive complaints about disabling mandatory libs by\n building the list of always enabled libs, appending this list to\n enable_list and checking the disable side,\n- updated enable/disable_libs descriptions,\n\nChanges since v2:\n- moved the IOVA check for kni build in lib/kni/meson.build,\n- reworked deprecated libraries handling by only considering them when\n no enable_libs option is set. With this, no need for a default value\n in meson_options.txt, yet configurations in the CI must be adjusted,\n- moved mandatory libraries check after enable/disable_libs evaluation,\n\n---\n lib/meson.build | 34 ++++++++++++++++++++++------------\n meson_options.txt | 4 +++-\n 2 files changed, 25 insertions(+), 13 deletions(-)", "diff": "diff --git a/lib/meson.build b/lib/meson.build\nindex 73afd90b38..b8834fc277 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -88,6 +88,13 @@ optional_libs = [\n 'vhost',\n ]\n \n+always_enable = []\n+foreach l:libraries\n+ if not optional_libs.contains(l)\n+ always_enable += l\n+ endif\n+endforeach\n+\n dpdk_libs_deprecated += [\n 'flow_classify',\n 'kni',\n@@ -102,17 +109,13 @@ foreach l:run_command(list_dir_globs, get_option('enable_deprecated_libs'),\n enable_deprecated_libs += l\n endforeach\n \n-disabled_libs = []\n-opt_disabled_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+disable_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split()\n \n+enable_libs = run_command(list_dir_globs, get_option('enable_libs'), check: true).stdout().split()\n+if enable_libs.length() == 0\n+ enable_libs += optional_libs\n+endif\n+enable_libs += always_enable\n \n default_cflags = machine_args\n default_cflags += ['-DALLOW_EXPERIMENTAL_API']\n@@ -153,9 +156,16 @@ foreach l:libraries\n else\n warning('Enabling deprecated library, \"@0@\"'.format(l))\n endif\n- elif disabled_libs.contains(l)\n+ elif not enable_libs.contains(l)\n build = false\n- reason = 'explicitly disabled via build config'\n+ reason = 'not in enabled libraries build config'\n+ elif disable_libs.contains(l)\n+ if always_enable.contains(l)\n+ warning('Cannot disable mandatory library \"@0@\"'.format(l))\n+ else\n+ build = false\n+ reason = 'explicitly disabled via build config'\n+ endif\n endif\n \n if build\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 839d4266c6..7312da3640 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -11,7 +11,7 @@ option('disable_apps', type: 'string', value: '', description:\n option('disable_drivers', type: 'string', value: '', description:\n 'Comma-separated list of drivers to explicitly disable.')\n option('disable_libs', type: 'string', value: '', description:\n- 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]')\n+ 'Comma-separated list of optional libraries to explicitly disable. [NOTE: mandatory libs cannot be disabled]')\n option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', description:\n 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')\n option('enable_docs', type: 'boolean', value: false, description:\n@@ -26,6 +26,8 @@ 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 'build kernel modules')\n+option('enable_libs', type: 'string', value: '', description:\n+ 'Comma-separated list of optional libraries to explicitly enable. [NOTE: mandatory libs are always enabled]')\n option('examples', type: 'string', value: '', description:\n 'Comma-separated list of examples to build by default')\n option('ibverbs_link', type: 'combo', choices : ['static', 'shared', 'dlopen'], value: 'shared', description:\n", "prefixes": [ "v6", "2/2" ] }{ "id": 129107, "url": "