Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134936/?format=api
http://patchwork.dpdk.org/api/patches/134936/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231207161818.2590661-9-euan.bourke@intel.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": "<20231207161818.2590661-9-euan.bourke@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231207161818.2590661-9-euan.bourke@intel.com", "date": "2023-12-07T16:18:18", "name": "[v3,8/8] examples/l3fwd-power: update to call arg parser API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fcb4b45abcee75bc525df225a332f76e854db613", "submitter": { "id": 3231, "url": "http://patchwork.dpdk.org/api/people/3231/?format=api", "name": "Euan Bourke", "email": "euan.bourke@intel.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/20231207161818.2590661-9-euan.bourke@intel.com/mbox/", "series": [ { "id": 30478, "url": "http://patchwork.dpdk.org/api/series/30478/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30478", "date": "2023-12-07T16:18:10", "name": "add new command line argument parsing library", "version": 3, "mbox": "http://patchwork.dpdk.org/series/30478/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/134936/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/134936/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 4A3E54369D;\n\tThu, 7 Dec 2023 17:19:38 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5F8A342F0D;\n\tThu, 7 Dec 2023 17:18:49 +0100 (CET)", "from mgamail.intel.com (mgamail.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 9293242F73\n for <dev@dpdk.org>; Thu, 7 Dec 2023 17:18:47 +0100 (CET)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Dec 2023 08:18:47 -0800", "from unknown (HELO silpixa00400630.ir.intel.com) ([10.237.213.151])\n by orsmga007.jf.intel.com with ESMTP; 07 Dec 2023 08:18:45 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1701965927; x=1733501927;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=PpOYE0dStoI251F0PbA1DOxL8iUA7tRPyFD/F9z/4CE=;\n b=XA8VjcgaDJw9igP7IoTolKNahgpnD0btmwPMGPDVcyqx7I2/9TZK/qqV\n CsxoJiyJ9Uh4V9MJAfTveAklddBlFeCDdaqOGKdFeHS0N+PQhp6m8DCfu\n C/eHNWtvjTT06FeaX7ehj2cpcl/KFPGyLzYGi5uBa1k+aysGMEU9a/iyh\n zo+JsOV78Y1+G1jJ0WpoH3v2NJdAgMO4Q4bUOoOwZAVI84DlYTC5plM1t\n yptNOZKSNrNaeKXi1XjpK5Tk3qYeAu4Efn85wBEXhJl5Zel0i7vpJgsCv\n N/hmqXTeWoPckcVx5XUNtFL4tCS5t6XNYKBsAzpQVogoQvPPhu5deM7G+ g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10917\"; a=\"397048631\"", "E=Sophos;i=\"6.04,256,1695711600\"; d=\"scan'208\";a=\"397048631\"", "E=McAfee;i=\"6600,9927,10917\"; a=\"765153990\"", "E=Sophos;i=\"6.04,256,1695711600\"; d=\"scan'208\";a=\"765153990\"" ], "X-ExtLoop1": "1", "From": "Euan Bourke <euan.bourke@intel.com>", "To": "dev@dpdk.org", "Cc": "Euan Bourke <euan.bourke@intel.com>,\n Anatoly Burakov <anatoly.burakov@intel.com>,\n David Hunt <david.hunt@intel.com>,\n Sivaprasad Tummala <sivaprasad.tummala@amd.com>", "Subject": "[PATCH v3 8/8] examples/l3fwd-power: update to call arg parser API", "Date": "Thu, 7 Dec 2023 16:18:18 +0000", "Message-Id": "<20231207161818.2590661-9-euan.bourke@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231207161818.2590661-1-euan.bourke@intel.com>", "References": "<20231207161818.2590661-1-euan.bourke@intel.com>", "MIME-Version": "1.0", "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": "Update to the l3fwd-power example application to call the arg parser\nlibrary for its 'combined core string parser' instead of implementing its\nown corelist parser. The default_type passed into the function call is\na corelist.\n\nSigned-off-by: Euan Bourke <euan.bourke@intel.com>\n---\n examples/l3fwd-power/perf_core.c | 51 +++++---------------------------\n 1 file changed, 8 insertions(+), 43 deletions(-)", "diff": "diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c\nindex 41ef6d0c9a..f8511e30b3 100644\n--- a/examples/l3fwd-power/perf_core.c\n+++ b/examples/l3fwd-power/perf_core.c\n@@ -12,6 +12,7 @@\n #include <rte_lcore.h>\n #include <rte_power.h>\n #include <rte_string_fns.h>\n+#include <rte_arg_parser.h>\n \n #include \"perf_core.h\"\n #include \"main.h\"\n@@ -177,56 +178,20 @@ parse_perf_config(const char *q_arg)\n int\n parse_perf_core_list(const char *corelist)\n {\n-\tint i, idx = 0;\n-\tunsigned int count = 0;\n-\tchar *end = NULL;\n-\tint min, max;\n+\tint count;\n+\tuint16_t cores[RTE_MAX_LCORE];\n \n \tif (corelist == NULL) {\n \t\tprintf(\"invalid core list\\n\");\n \t\treturn -1;\n \t}\n \n+\tcount = rte_arg_parse_core_string(corelist, cores, RTE_DIM(cores), 1);\n \n-\t/* Remove all blank characters ahead and after */\n-\twhile (isblank(*corelist))\n-\t\tcorelist++;\n-\ti = strlen(corelist);\n-\twhile ((i > 0) && isblank(corelist[i - 1]))\n-\t\ti--;\n+\tfor (int i = 0; i < count; i++)\n+\t\thp_lcores[i] = cores[i];\n \n-\t/* Get list of cores */\n-\tmin = RTE_MAX_LCORE;\n-\tdo {\n-\t\twhile (isblank(*corelist))\n-\t\t\tcorelist++;\n-\t\tif (*corelist == '\\0')\n-\t\t\treturn -1;\n-\t\terrno = 0;\n-\t\tidx = strtoul(corelist, &end, 10);\n-\t\tif (errno || end == NULL)\n-\t\t\treturn -1;\n-\t\twhile (isblank(*end))\n-\t\t\tend++;\n-\t\tif (*end == '-') {\n-\t\t\tmin = idx;\n-\t\t} else if ((*end == ',') || (*end == '\\0')) {\n-\t\t\tmax = idx;\n-\t\t\tif (min == RTE_MAX_LCORE)\n-\t\t\t\tmin = idx;\n-\t\t\tfor (idx = min; idx <= max; idx++) {\n-\t\t\t\thp_lcores[count] = idx;\n-\t\t\t\tcount++;\n-\t\t\t}\n-\t\t\tmin = RTE_MAX_LCORE;\n-\t\t} else {\n-\t\t\tprintf(\"invalid core list\\n\");\n-\t\t\treturn -1;\n-\t\t}\n-\t\tcorelist = end + 1;\n-\t} while (*end != '\\0');\n-\n-\tif (count == 0) {\n+\tif (count == 0 || count == -1) {\n \t\tprintf(\"invalid core list\\n\");\n \t\treturn -1;\n \t}\n@@ -234,7 +199,7 @@ parse_perf_core_list(const char *corelist)\n \tnb_hp_lcores = count;\n \n \tprintf(\"Configured %d high performance cores\\n\", nb_hp_lcores);\n-\tfor (i = 0; i < nb_hp_lcores; i++)\n+\tfor (uint16_t i = 0; i < nb_hp_lcores; i++)\n \t\tprintf(\"\\tHigh performance core %d %d\\n\",\n \t\t\t\ti, hp_lcores[i]);\n \n", "prefixes": [ "v3", "8/8" ] }{ "id": 134936, "url": "