Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134539/?format=api
http://patchwork.dpdk.org/api/patches/134539/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231122164550.3873633-5-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": "<20231122164550.3873633-5-euan.bourke@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231122164550.3873633-5-euan.bourke@intel.com", "date": "2023-11-22T16:45:50", "name": "[24.03,4/4] dlb2: add new arg parsing library API support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a8ef177610b9d845a88303e94157eb391b9b43ba", "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/20231122164550.3873633-5-euan.bourke@intel.com/mbox/", "series": [ { "id": 30362, "url": "http://patchwork.dpdk.org/api/series/30362/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30362", "date": "2023-11-22T16:45:46", "name": "add new command line argument parsing library", "version": 1, "mbox": "http://patchwork.dpdk.org/series/30362/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/134539/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/134539/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 CD94F43382;\n\tWed, 22 Nov 2023 17:48:23 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B445442D35;\n\tWed, 22 Nov 2023 17:48:00 +0100 (CET)", "from mgamail.intel.com (mgamail.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 123F941133\n for <dev@dpdk.org>; Wed, 22 Nov 2023 17:46:06 +0100 (CET)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Nov 2023 08:46:05 -0800", "from unknown (HELO silpixa00400630.ir.intel.com) ([10.237.213.151])\n by fmsmga002.fm.intel.com with ESMTP; 22 Nov 2023 08:46: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=1700671566; x=1732207566;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=LYFo+tM1if1i3/yLMQL40YZVnPsIdjOrjUCpz5Kkhi8=;\n b=eghvW2cvO5Jfg3wXt0gEtbd0n9LQ1KeMqnmZakTSkaL9uYlikEEVkoh8\n cQU5yXGjAY4B/rFkmxeQ+AGWuOWR2qh0UsJzleXlarhG9lM8deAaU2zYz\n qE9rCQ3W6GzrdArghBXbSm8GHIvksdhonOQ8Go3OboOw4dKhqcx+GydXd\n DNGl/GPycJVuepJoEUVfBosjcXIhSMYOd/LgvwW6PSoUAhffNJwlpExYQ\n macAClJdkAa0mDn+3VsmP1kQoLP8uiKjLpft8EeRIn1t/0Z0FM3el6UWJ\n jISHBbbCJ5Pn3lXaicJClW4xQSThyBQGzXDaHEJQ6KD1+wkFQM+6H78lS A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10902\"; a=\"456416041\"", "E=Sophos;i=\"6.04,219,1695711600\"; d=\"scan'208\";a=\"456416041\"", "E=McAfee;i=\"6600,9927,10902\"; a=\"884685147\"", "E=Sophos;i=\"6.04,219,1695711600\"; d=\"scan'208\";a=\"884685147\"" ], "X-ExtLoop1": "1", "From": "Euan Bourke <euan.bourke@intel.com>", "To": "dev@dpdk.org", "Cc": "Euan Bourke <euan.bourke@intel.com>", "Subject": "[PATCH 24.03 4/4] dlb2: add new arg parsing library API support", "Date": "Wed, 22 Nov 2023 16:45:50 +0000", "Message-Id": "<20231122164550.3873633-5-euan.bourke@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231122164550.3873633-1-euan.bourke@intel.com>", "References": "<20231122164550.3873633-1-euan.bourke@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Approved-At": "Wed, 22 Nov 2023 17:47:54 +0100", "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 eal for\ncoremask parsing, and updated the resource probe funcion to support the changed\nformatting 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 | 54 +++++++++-------------\n 2 files changed, 22 insertions(+), 36 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..422d075ff8 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,37 @@ 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_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-\t\t\tDLB2_LOG_ERR(\"Producer coremask(%s) must be a subset of EAL coremask\",\n-\t\t\t\t mask);\n-\t\t\treturn -1;\n-\t\t}\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}\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+\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\", mask);\t\t\t\t\t\t \t\t\t \t\t\t\t \n+\t\t\treturn -1;\n+\t} \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": [ "24.03", "4/4" ] }{ "id": 134539, "url": "