Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134933/?format=api
http://patchwork.dpdk.org/api/patches/134933/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231207161818.2590661-6-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-6-euan.bourke@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231207161818.2590661-6-euan.bourke@intel.com", "date": "2023-12-07T16:18:15", "name": "[v3,5/8] event/dlb2: add new arg parsing library API support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3ed092868744b1cefa4611ed86c19a55cc2610ff", "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-6-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/134933/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/134933/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 CA7394369D;\n\tThu, 7 Dec 2023 17:19:18 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 460B142F67;\n\tThu, 7 Dec 2023 17:18:46 +0100 (CET)", "from mgamail.intel.com (mgamail.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 3D38B42F3F\n for <dev@dpdk.org>; Thu, 7 Dec 2023 17:18:43 +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:42 -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:41 -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=1701965923; x=1733501923;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=zFQ2rHxu1X0r2TEHDZIX1mt9oK01LWnLJ4/zA2wqdLA=;\n b=kLSQ/QCK6qfUky2XVzakhgib+Ly4ghjN6lHNpGKaWje4OBNmi6kZ8FGb\n V8uaXPROdAHNATTPD0rKhDO+fYhd7OD/717/y3U/HQwG8IxRhq1lAntf3\n /E4AX2Hk5gDOxY1AixQGbSd737GBIdsV+IyIFZm3fJdWb9AQJ7FzRuuWd\n x+eoHtZUiyiIdvFkiwZp99TXFEqf3XTT8rINwdk0HX7/cJkS861CRAvf7\n mWQ3HZkDeRvG0VmoEahJpB/G44bvIsdPKsn/KbDqmC8nMgZ0Vb4AKC22h\n vTxn9xKWZng0yxfLwZ03OQCh+OuF4l2d8nUwAun1P8WdmQXj8Z83dkbrA w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10917\"; a=\"397048622\"", "E=Sophos;i=\"6.04,256,1695711600\"; d=\"scan'208\";a=\"397048622\"", "E=McAfee;i=\"6600,9927,10917\"; a=\"765153981\"", "E=Sophos;i=\"6.04,256,1695711600\"; d=\"scan'208\";a=\"765153981\"" ], "X-ExtLoop1": "1", "From": "Euan Bourke <euan.bourke@intel.com>", "To": "dev@dpdk.org", "Cc": "Euan Bourke <euan.bourke@intel.com>,\n Abdullah Sevincer <abdullah.sevincer@intel.com>", "Subject": "[PATCH v3 5/8] event/dlb2: add new arg parsing library API support", "Date": "Thu, 7 Dec 2023 16:18:15 +0000", "Message-Id": "<20231207161818.2590661-6-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": "Switched the dlb2 driver to call the new arg parsing library instead of\neal for coremask parsing, and updated the resource probe function to\nsupport the changed formatting of the API.\n\nSigned-off-by: Euan Bourke <euan.bourke@intel.com>\n---\n drivers/event/dlb2/dlb2_priv.h | 4 +-\n drivers/event/dlb2/pf/base/dlb2_resource.c | 51 +++++++++-------------\n 2 files changed, 21 insertions(+), 34 deletions(-)", "diff": "diff --git a/drivers/event/dlb2/dlb2_priv.h b/drivers/event/dlb2/dlb2_priv.h\nindex 31a3beeb6c..c14d83da5b 100644\n--- a/drivers/event/dlb2/dlb2_priv.h\n+++ b/drivers/event/dlb2/dlb2_priv.h\n@@ -10,6 +10,7 @@\n \n #include <rte_eventdev.h>\n #include <rte_config.h>\n+#include <rte_arg_parser.h>\n #include \"dlb2_user.h\"\n #include \"dlb2_log.h\"\n #include \"rte_pmd_dlb2.h\"\n@@ -729,9 +730,6 @@ void dlb2_event_build_hcws(struct dlb2_port *qm_port,\n \t\t\t uint8_t *sched_type,\n \t\t\t uint8_t *queue_id);\n \n-/* Extern functions */\n-extern int rte_eal_parse_coremask(const char *coremask, int *cores);\n-\n /* Extern globals */\n extern struct process_local_port_data dlb2_port[][DLB2_NUM_PORT_TYPES];\n \ndiff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c\nindex 7ce3e3531c..b65de9350a 100644\n--- a/drivers/event/dlb2/pf/base/dlb2_resource.c\n+++ b/drivers/event/dlb2/pf/base/dlb2_resource.c\n@@ -922,49 +922,38 @@ dlb2_resource_probe(struct dlb2_hw *hw, const void *probe_args)\n {\n \tconst struct dlb2_devargs *args = (const struct dlb2_devargs *)probe_args;\n \tconst char *mask = args ? args->producer_coremask : NULL;\n-\tint cpu = 0, cnt = 0, cores[RTE_MAX_LCORE], i;\n+\tint cpu = 0, i;\n+\tuint16_t cores[RTE_MAX_LCORE];\n \n \tif (args) {\n \t\tmask = (const char *)args->producer_coremask;\n \t}\n \n-\tif (mask && rte_eal_parse_coremask(mask, cores)) {\n+\tint ret = rte_arg_parse_coremask(mask, cores, RTE_DIM(cores));\n+\n+\tif (mask && ret == -1) {\n \t\tDLB2_LOG_ERR(\": Invalid producer coremask=%s\", mask);\n \t\treturn -1;\n \t}\n \n-\thw->num_prod_cores = 0;\n-\tfor (i = 0; i < RTE_MAX_LCORE; i++) {\n-\t\tbool is_pcore = (mask && cores[i] != -1);\n-\n-\t\tif (rte_lcore_is_enabled(i)) {\n-\t\t\tif (is_pcore) {\n-\t\t\t\t/*\n-\t\t\t\t * Populate the producer cores from parsed\n-\t\t\t\t * coremask\n-\t\t\t\t */\n-\t\t\t\thw->prod_core_list[cores[i]] = i;\n-\t\t\t\thw->num_prod_cores++;\n-\n-\t\t\t} else if ((++cnt == DLB2_EAL_PROBE_CORE ||\n-\t\t\t rte_lcore_count() < DLB2_EAL_PROBE_CORE)) {\n-\t\t\t\t/*\n-\t\t\t\t * If no producer coremask is provided, use the\n-\t\t\t\t * second EAL core to probe\n-\t\t\t\t */\n-\t\t\t\tcpu = i;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t} else if (is_pcore) {\n+\thw->num_prod_cores = ret;\n+\t/* Check for no producer cores and then get the second EAL core */\n+\tif (hw->num_prod_cores > 0)\n+\t\tcpu = cores[0];\n+\telse if (rte_lcore_count() < DLB2_EAL_PROBE_CORE)\n+\t\tcpu = rte_get_main_lcore();\n+\telse\n+\t\tcpu = rte_get_next_lcore(-1, 1, 0);\n+\n+\t/* check our producer list is valid and error out if not */\n+\tfor (i = 0; i < hw->num_prod_cores; i++) {\n+\t\tif (!rte_lcore_is_enabled(cores[i])) {\n \t\t\tDLB2_LOG_ERR(\"Producer coremask(%s) must be a subset of EAL coremask\",\n-\t\t\t\t mask);\n+\t\t\t\tmask);\n \t\t\treturn -1;\n-\t\t}\n-\n \t}\n-\t/* Use the first core in producer coremask to probe */\n-\tif (hw->num_prod_cores)\n-\t\tcpu = hw->prod_core_list[0];\n+\thw->prod_core_list[i] = cores[i];\n+}\n \n \tdlb2_get_pp_allocation(hw, cpu, DLB2_LDB_PORT);\n \tdlb2_get_pp_allocation(hw, cpu, DLB2_DIR_PORT);\n", "prefixes": [ "v3", "5/8" ] }{ "id": 134933, "url": "