get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/134696/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 134696,
    "url": "http://patchwork.dpdk.org/api/patches/134696/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231128140745.595481-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": "<20231128140745.595481-6-euan.bourke@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231128140745.595481-6-euan.bourke@intel.com",
    "date": "2023-11-28T14:07:45",
    "name": "[24.03,v2,5/5] event/dlb2: add new arg parsing library API support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ac6f6221d65afaab4138cdd813e0afc63e21c90c",
    "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/20231128140745.595481-6-euan.bourke@intel.com/mbox/",
    "series": [
        {
            "id": 30412,
            "url": "http://patchwork.dpdk.org/api/series/30412/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30412",
            "date": "2023-11-28T14:07:40",
            "name": "add new command line argument parsing library",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/30412/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/134696/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/134696/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 29DC743402;\n\tWed, 29 Nov 2023 17:07:24 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C92F542E53;\n\tWed, 29 Nov 2023 17:06:43 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id DA84E42D89\n for <dev@dpdk.org>; Tue, 28 Nov 2023 15:08:29 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Nov 2023 06:08:12 -0800",
            "from unknown (HELO silpixa00400630.ir.intel.com) ([10.237.213.151])\n by fmsmga001.fm.intel.com with ESMTP; 28 Nov 2023 06:08:10 -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=1701180510; x=1732716510;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=qjhJtH9CwxTSMbthNQXVfVsM/Tp0Btb35w3IlMhUzhU=;\n b=VLZOGAYR5bZwAOQZt8EbL1E2tv8YUNEJrRWArIheSCiX4mQS5dVcLTfA\n DBErgVijJq5XG4i3VaB98Hgy5+GXj+P8jrf+fdHZVyJ5xXQkTlVjpxAIh\n oYrO+TFWQKyBh3vB238ECS8DYcuH8K+Mt/VgOJOqwmrf81dqUOVvMV+5v\n H1C5QUXoe4F2ku7BCnUzi/v49H3FSXcVmeHmd4Ib/FDhv4c85+tg6CuYt\n q0eDIRNg2GZSzQx3Srlum4Fjbqp0tkAj5OPvAAuXYUZGW+G17BUzE8HVo\n RjFQlxwKC4jW4n4ulhGIqRU4ZvmkqxtggByhzafotv7QCsPghrKSYDTk2 w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10907\"; a=\"395747526\"",
            "E=Sophos;i=\"6.04,234,1695711600\"; d=\"scan'208\";a=\"395747526\"",
            "E=McAfee;i=\"6600,9927,10907\"; a=\"912450904\"",
            "E=Sophos;i=\"6.04,234,1695711600\"; d=\"scan'208\";a=\"912450904\""
        ],
        "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 24.03 v2 5/5] event/dlb2: add new arg parsing library API\n support",
        "Date": "Tue, 28 Nov 2023 14:07:45 +0000",
        "Message-Id": "<20231128140745.595481-6-euan.bourke@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231128140745.595481-1-euan.bourke@intel.com>",
        "References": "<20231122164550.3873633-1-euan.bourke@intel.com>\n <20231128140745.595481-1-euan.bourke@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Wed, 29 Nov 2023 17:06:37 +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\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..fda094c3f7 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_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": [
        "24.03",
        "v2",
        "5/5"
    ]
}