get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135237,
    "url": "http://patchwork.dpdk.org/api/patches/135237/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231215172632.3102502-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": "<20231215172632.3102502-6-euan.bourke@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231215172632.3102502-6-euan.bourke@intel.com",
    "date": "2023-12-15T17:26:29",
    "name": "[v4,5/8] event/dlb2: add new arg parsing library API support",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "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/20231215172632.3102502-6-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/135237/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/135237/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 97F9143700;\n\tFri, 15 Dec 2023 18:27:19 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6F0B94339A;\n\tFri, 15 Dec 2023 18:27:00 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [192.198.163.10])\n by mails.dpdk.org (Postfix) with ESMTP id 7B6B4433A8\n for <dev@dpdk.org>; Fri, 15 Dec 2023 18:26:58 +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:26:58 -0800",
            "from unknown (HELO silpixa00400630.ir.intel.com) ([10.237.213.151])\n by orviesa001.jf.intel.com with ESMTP; 15 Dec 2023 09:26:57 -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=1702661218; x=1734197218;\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=Okktz0HkEiS0u18MJqJqTckbWBm9s/lMoKb7sS9X7+5Qve3HyYUlKDnn\n l9UKGRCo8csLiij8KBrted1cRrrI3iNbtxIaa7DWTimB+fHHIvun1hT2k\n JzLkcTAGbadEhvSebLXSvGwFAefDU6NE9g3+397zkUDblRRwmn8qnLFze\n Qp7QTl9qadxHQo6umd720z1CJGS3H6sn85tUCJfp3YXDGV/o5wo/9Tafj\n HSF0J+kcP8/fxX9gurGceDSiLR8CX2g8Y0LfcZ3MrHc85V4jCKEW3iCkN\n NiRDHFtl1dyscOXrr6m6kUEjtNzFVNICGH4BS4uhWIaJu0BQLRBGaaUpk A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10925\"; a=\"2474251\"",
            "E=Sophos;i=\"6.04,279,1695711600\";\n   d=\"scan'208\";a=\"2474251\"",
            "E=Sophos;i=\"6.04,279,1695711600\"; d=\"scan'208\";a=\"22914270\""
        ],
        "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 v4 5/8] event/dlb2: add new arg parsing library API support",
        "Date": "Fri, 15 Dec 2023 17:26:29 +0000",
        "Message-Id": "<20231215172632.3102502-6-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": "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": [
        "v4",
        "5/8"
    ]
}