Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/135240/?format=api
http://patchwork.dpdk.org/api/patches/135240/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231215172632.3102502-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": "<20231215172632.3102502-9-euan.bourke@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231215172632.3102502-9-euan.bourke@intel.com", "date": "2023-12-15T17:26:32", "name": "[v4,8/8] examples/l3fwd-power: update to call arg parser API", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "41763d6eba67a7572c39d778cdeabbdff0bfb6c6", "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/20231215172632.3102502-9-euan.bourke@intel.com/mbox/", "series": [ { "id": 30582, "url": "http://patchwork.dpdk.org/api/series/30582/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30582", "date": "2023-12-15T17:26:24", "name": "add new command line argument parsing library", "version": 4, "mbox": "http://patchwork.dpdk.org/series/30582/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/135240/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/135240/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 1375A43700;\n\tFri, 15 Dec 2023 18:27:42 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 07038433BA;\n\tFri, 15 Dec 2023 18:27:09 +0100 (CET)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.10])\n by mails.dpdk.org (Postfix) with ESMTP id 042F7433BA\n for <dev@dpdk.org>; Fri, 15 Dec 2023 18:27:06 +0100 (CET)", "from orviesa001.jf.intel.com ([10.64.159.141])\n by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Dec 2023 09:27:06 -0800", "from unknown (HELO silpixa00400630.ir.intel.com) ([10.237.213.151])\n by orviesa001.jf.intel.com with ESMTP; 15 Dec 2023 09:27:05 -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=1702661227; x=1734197227;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=MvgOX7W+CxNxzucGWfoItQH9t6AmZZ75Up9W9eV8szs=;\n b=S6tB8BxLt9fjUG2ynCVuXZMxyNlQTnJre0BN6t66MIiNujbvt6AQidMy\n SFrRy+vQcizLy2bHHPMq9ZImCNN4uPIvHebqbQrEg3RWKJjlGsrUuJSj6\n pc2+sQUcSDaEmChAVFBOLHLauNOiTA0ywDb4xGB04iZcmLEsSz/H+hTMB\n sZT7zlqfVO0ckvIEYoYb3xdOuBg+aEVsSz4JQudWJWZb0EvdhPKqqbOLe\n Grr/VGuI2WDmjzhuhQrs7NyQq28nRYOwb23M/leh09mof9DZ3HQEybm7w\n +GTXXAPQPMA786RbZHWlw7QBB2AYLptaeJ93Ynm3uRZGTCkWAEmwNYf5o w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10925\"; a=\"2474266\"", "E=Sophos;i=\"6.04,279,1695711600\";\n d=\"scan'208\";a=\"2474266\"", "E=Sophos;i=\"6.04,279,1695711600\"; d=\"scan'208\";a=\"22914297\"" ], "X-ExtLoop1": "1", "From": "Euan Bourke <euan.bourke@intel.com>", "To": "dev@dpdk.org", "Cc": "Euan Bourke <euan.bourke@intel.com>, David Hunt <david.hunt@intel.com>,\n Anatoly Burakov <anatoly.burakov@intel.com>,\n Sivaprasad Tummala <sivaprasad.tummala@amd.com>", "Subject": "[PATCH v4 8/8] examples/l3fwd-power: update to call arg parser API", "Date": "Fri, 15 Dec 2023 17:26:32 +0000", "Message-Id": "<20231215172632.3102502-9-euan.bourke@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231215172632.3102502-1-euan.bourke@intel.com>", "References": "\n <https://inbox.dpdk.org/dev/20231207161818.2590661-1-euan.bourke@intel.com/>\n <20231215172632.3102502-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>\nAcked-by: David Hunt <david.hunt@intel.com>\n---\n examples/l3fwd-power/perf_core.c | 52 ++++++--------------------------\n 1 file changed, 9 insertions(+), 43 deletions(-)", "diff": "diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c\nindex 41ef6d0c9a..e8ed414d40 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,21 @@ 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),\n+\t\t\t\tRTE_ARG_PARSE_TYPE_CORELIST);\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 +200,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 (int 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": [ "v4", "8/8" ] }{ "id": 135240, "url": "