Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104128/?format=api
http://patches.dpdk.org/api/patches/104128/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211110164814.5231-4-david.marchand@redhat.com/", "project": { "id": 1, "url": "http://patches.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": "<20211110164814.5231-4-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211110164814.5231-4-david.marchand@redhat.com", "date": "2021-11-10T16:48:12", "name": "[3/5] build: make metrics libraries optional", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "08cc7e08a3f0b2aad8242be66062c0590ca39cf0", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211110164814.5231-4-david.marchand@redhat.com/mbox/", "series": [ { "id": 20466, "url": "http://patches.dpdk.org/api/series/20466/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20466", "date": "2021-11-10T16:48:09", "name": "Extend optional libraries list", "version": 1, "mbox": "http://patches.dpdk.org/series/20466/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/104128/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/104128/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 A1B86A034F;\n\tWed, 10 Nov 2021 17:49:05 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8DB444115C;\n\tWed, 10 Nov 2021 17:49:05 +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 608004114E\n for <dev@dpdk.org>; Wed, 10 Nov 2021 17:49:04 +0100 (CET)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-361-z4TBiDlcMnyvp9aUIrbGiQ-1; Wed, 10 Nov 2021 11:49:00 -0500", "from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com\n [10.5.11.13])\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 E3763101F7B1;\n Wed, 10 Nov 2021 16:48:58 +0000 (UTC)", "from dmarchan.remote.csb (unknown [10.40.192.42])\n by smtp.corp.redhat.com (Postfix) with ESMTP id DA72360854;\n Wed, 10 Nov 2021 16:48:54 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1636562943;\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=3fWsxBn4/sMMl1MpeKR1R8XcJHdm4cmn1tqnqv1Hy0w=;\n b=G/BXkgbb9N+LMAPp0VutQEq3/HNyRGR2Jb3BKm8JLtQJiAh//53qljsFVF5gh+2PWOFKg9\n CRmCNLKT7v3yOO1wKC2/9JdvW/vbd50SBhMFGA76Mww+xLQXrDfWjjEUdXzF+hiN/VH1LD\n UkFM7nPDCFNaphdcr3/MzjrOpEwAK00=", "X-MC-Unique": "z4TBiDlcMnyvp9aUIrbGiQ-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, Maryam Tahhan <maryam.tahhan@intel.com>,\n Reshma Pattan <reshma.pattan@intel.com>, Xiaoyun Li <xiaoyun.li@intel.com>", "Subject": "[PATCH 3/5] build: make metrics libraries optional", "Date": "Wed, 10 Nov 2021 17:48:12 +0100", "Message-Id": "<20211110164814.5231-4-david.marchand@redhat.com>", "In-Reply-To": "<20211110164814.5231-1-david.marchand@redhat.com>", "References": "<20211110164814.5231-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13", "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": "metrics, bitratestats, jobstats and latencystats libraries can be made\noptional as they provide standalone features.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n app/proc-info/main.c | 16 ++++++++++++++++\n app/proc-info/meson.build | 5 ++++-\n app/test-pmd/meson.build | 5 ++++-\n app/test-pmd/testpmd.c | 4 ++++\n app/test/meson.build | 24 +++++++++++++++---------\n lib/meson.build | 4 ++++\n 6 files changed, 47 insertions(+), 11 deletions(-)", "diff": "diff --git a/app/proc-info/main.c b/app/proc-info/main.c\nindex a4271047e6..19223d034c 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -30,7 +30,9 @@\n #include <rte_atomic.h>\n #include <rte_branch_prediction.h>\n #include <rte_string_fns.h>\n+#ifdef RTE_LIB_METRICS\n #include <rte_metrics.h>\n+#endif\n #include <rte_cycles.h>\n #ifdef RTE_LIB_SECURITY\n #include <rte_security.h>\n@@ -59,8 +61,10 @@ static uint32_t enable_collectd_format;\n static int stdout_fd;\n /**< Host id process is running on */\n static char host_id[MAX_LONG_OPT_SZ];\n+#ifdef RTE_LIB_METRICS\n /**< Enable metrics. */\n static uint32_t enable_metrics;\n+#endif\n /**< Enable stats reset. */\n static uint32_t reset_stats;\n /**< Enable xstats reset. */\n@@ -108,8 +112,10 @@ proc_info_usage(const char *prgname)\n \t\t\" --stats: to display port statistics, enabled by default\\n\"\n \t\t\" --xstats: to display extended port statistics, disabled by \"\n \t\t\t\"default\\n\"\n+#ifdef RTE_LIB_METRICS\n \t\t\" --metrics: to display derived metrics of the ports, disabled by \"\n \t\t\t\"default\\n\"\n+#endif\n \t\t\" --xstats-name NAME: to display single xstat id by NAME\\n\"\n \t\t\" --xstats-ids IDLIST: to display xstat values by id. \"\n \t\t\t\"The argument is comma-separated list of xstat ids to print out.\\n\"\n@@ -218,7 +224,9 @@ proc_info_parse_args(int argc, char **argv)\n \t\t{\"stats\", 0, NULL, 0},\n \t\t{\"stats-reset\", 0, NULL, 0},\n \t\t{\"xstats\", 0, NULL, 0},\n+#ifdef RTE_LIB_METRICS\n \t\t{\"metrics\", 0, NULL, 0},\n+#endif\n \t\t{\"xstats-reset\", 0, NULL, 0},\n \t\t{\"xstats-name\", required_argument, NULL, 1},\n \t\t{\"collectd-format\", 0, NULL, 0},\n@@ -260,10 +268,12 @@ proc_info_parse_args(int argc, char **argv)\n \t\t\telse if (!strncmp(long_option[option_index].name, \"xstats\",\n \t\t\t\t\tMAX_LONG_OPT_SZ))\n \t\t\t\tenable_xstats = 1;\n+#ifdef RTE_LIB_METRICS\n \t\t\telse if (!strncmp(long_option[option_index].name,\n \t\t\t\t\t\"metrics\",\n \t\t\t\t\tMAX_LONG_OPT_SZ))\n \t\t\t\tenable_metrics = 1;\n+#endif\n \t\t\t/* Reset stats */\n \t\t\tif (!strncmp(long_option[option_index].name, \"stats-reset\",\n \t\t\t\t\tMAX_LONG_OPT_SZ))\n@@ -593,6 +603,7 @@ nic_xstats_clear(uint16_t port_id)\n \tprintf(\"\\n NIC extended statistics for port %d cleared\\n\", port_id);\n }\n \n+#ifdef RTE_LIB_METRICS\n static void\n metrics_display(int port_id)\n {\n@@ -653,6 +664,7 @@ metrics_display(int port_id)\n \trte_free(metrics);\n \trte_free(names);\n }\n+#endif\n \n static void\n show_security_context(uint16_t portid, bool inline_offload)\n@@ -1522,14 +1534,18 @@ main(int argc, char **argv)\n \t\telse if (nb_xstats_ids > 0)\n \t\t\tnic_xstats_by_ids_display(i, xstats_ids,\n \t\t\t\t\t\t nb_xstats_ids);\n+#ifdef RTE_LIB_METRICS\n \t\telse if (enable_metrics)\n \t\t\tmetrics_display(i);\n+#endif\n \n \t}\n \n+#ifdef RTE_LIB_METRICS\n \t/* print port independent stats */\n \tif (enable_metrics)\n \t\tmetrics_display(RTE_METRICS_GLOBAL);\n+#endif\n \n \t/* show information for PMD */\n \tif (enable_shw_port)\ndiff --git a/app/proc-info/meson.build b/app/proc-info/meson.build\nindex 1062e0ef86..1563ce656a 100644\n--- a/app/proc-info/meson.build\n+++ b/app/proc-info/meson.build\n@@ -8,4 +8,7 @@ if is_windows\n endif\n \n sources = files('main.c')\n-deps += ['ethdev', 'metrics', 'security']\n+deps += ['ethdev', 'security']\n+if dpdk_conf.has('RTE_LIB_METRICS')\n+ deps += 'metrics'\n+endif\ndiff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build\nindex eba03b572c..43130c8856 100644\n--- a/app/test-pmd/meson.build\n+++ b/app/test-pmd/meson.build\n@@ -32,7 +32,7 @@ if dpdk_conf.has('RTE_HAS_JANSSON')\n ext_deps += jansson_dep\n endif\n \n-deps += ['ethdev', 'cmdline', 'metrics', 'bus_pci']\n+deps += ['ethdev', 'cmdline', 'bus_pci']\n if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')\n deps += 'crypto_scheduler'\n endif\n@@ -52,6 +52,9 @@ endif\n if dpdk_conf.has('RTE_LIB_LATENCYSTATS')\n deps += 'latencystats'\n endif\n+if dpdk_conf.has('RTE_LIB_METRICS')\n+ deps += 'metrics'\n+endif\n if dpdk_conf.has('RTE_LIB_PDUMP')\n deps += 'pdump'\n endif\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex e2998b066b..73b8ba7236 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -55,7 +55,9 @@\n #include <rte_pdump.h>\n #endif\n #include <rte_flow.h>\n+#ifdef RTE_LIB_METRICS\n #include <rte_metrics.h>\n+#endif\n #ifdef RTE_LIB_BITRATESTATS\n #include <rte_bitrate.h>\n #endif\n@@ -4231,8 +4233,10 @@ main(int argc, char** argv)\n \t\t\t\tport_id, rte_strerror(-ret));\n \t}\n \n+#ifdef RTE_LIB_METRICS\n \t/* Init metrics library */\n \trte_metrics_init(rte_socket_id());\n+#endif\n \n #ifdef RTE_LIB_LATENCYSTATS\n \tif (latencystats_enabled != 0) {\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex a968abac76..b5f1a89edf 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -98,7 +98,6 @@ test_sources = files(\n 'test_mempool_perf.c',\n 'test_memzone.c',\n 'test_meter.c',\n- 'test_metrics.c',\n 'test_mcslock.c',\n 'test_mp_secondary.c',\n 'test_per_lcore.c',\n@@ -162,7 +161,6 @@ test_deps = [\n 'acl',\n 'bus_pci',\n 'bus_vdev',\n- 'bitratestats',\n 'bpf',\n 'cfgfile',\n 'cmdline',\n@@ -177,10 +175,8 @@ test_deps = [\n 'graph',\n 'hash',\n 'ipsec',\n- 'latencystats',\n 'lpm',\n 'member',\n- 'metrics',\n 'node',\n 'pipeline',\n 'port',\n@@ -281,7 +277,6 @@ fast_tests = [\n ['kni_autotest', false],\n ['kvargs_autotest', true],\n ['member_autotest', true],\n- ['metrics_autotest', true],\n ['power_cpufreq_autotest', false],\n ['power_autotest', true],\n ['power_kvm_vm_autotest', false],\n@@ -378,6 +373,11 @@ endif\n if dpdk_conf.has('RTE_EVENT_SKELETON')\n test_deps += 'event_skeleton'\n endif\n+if dpdk_conf.has('RTE_LIB_METRICS')\n+ test_deps += 'metrics'\n+ test_sources += ['test_metrics.c']\n+ fast_tests += [['metrics_autotest', true]]\n+endif\n if dpdk_conf.has('RTE_LIB_TELEMETRY')\n test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']\n fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]\n@@ -399,16 +399,22 @@ if dpdk_conf.has('RTE_NET_RING')\n test_sources += 'test_pmd_ring_perf.c'\n test_sources += 'test_pmd_ring.c'\n test_sources += 'test_event_eth_tx_adapter.c'\n- test_sources += 'test_bitratestats.c'\n- test_sources += 'test_latencystats.c'\n test_sources += 'sample_packet_forward.c'\n test_sources += 'test_pdump.c'\n fast_tests += [['ring_pmd_autotest', true]]\n perf_test_names += 'ring_pmd_perf_autotest'\n fast_tests += [['event_eth_tx_adapter_autotest', false]]\n- fast_tests += [['bitratestats_autotest', true]]\n- fast_tests += [['latencystats_autotest', true]]\n fast_tests += [['pdump_autotest', true]]\n+ if dpdk_conf.has('RTE_LIB_BITRATESTATS')\n+ test_deps += 'bitratestats'\n+ test_sources += 'test_bitratestats.c'\n+ fast_tests += [['bitratestats_autotest', true]]\n+ endif\n+ if dpdk_conf.has('RTE_LIB_LATENCYSTATS')\n+ test_deps += 'latencystats'\n+ test_sources += 'test_latencystats.c'\n+ fast_tests += [['latencystats_autotest', true]]\n+ endif\n endif\n \n if dpdk_conf.has('RTE_HAS_LIBPCAP')\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 2766c02bd2..961b95f4ad 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -66,9 +66,13 @@ libraries = [\n ]\n \n optional_libs = [\n+ 'bitratestats',\n 'gro',\n 'gso',\n 'kni',\n+ 'jobstats',\n+ 'latencystats',\n+ 'metrics',\n 'power',\n 'vhost',\n ]\n", "prefixes": [ "3/5" ] }{ "id": 104128, "url": "