get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129398,
    "url": "https://patches.dpdk.org/api/patches/129398/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230708162356.2961843-1-abdullah.sevincer@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.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": "<20230708162356.2961843-1-abdullah.sevincer@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230708162356.2961843-1-abdullah.sevincer@intel.com",
    "date": "2023-07-08T16:23:56",
    "name": "[v1] app/procinfo: revise display eventdev xstats",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "df78d2cdcb3182d3904f54ea12042512808728c1",
    "submitter": {
        "id": 2843,
        "url": "https://patches.dpdk.org/api/people/2843/?format=api",
        "name": "Sevincer, Abdullah",
        "email": "abdullah.sevincer@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230708162356.2961843-1-abdullah.sevincer@intel.com/mbox/",
    "series": [
        {
            "id": 28879,
            "url": "https://patches.dpdk.org/api/series/28879/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28879",
            "date": "2023-07-08T16:23:56",
            "name": "[v1] app/procinfo: revise display eventdev xstats",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/28879/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/129398/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/129398/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 CFED642E22;\n\tSat,  8 Jul 2023 18:24:03 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5CC5540A8A;\n\tSat,  8 Jul 2023 18:24:03 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 07B8E40156;\n Sat,  8 Jul 2023 18:24:00 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Jul 2023 09:23:59 -0700",
            "from txanpdk02.an.intel.com ([10.123.117.76])\n by fmsmga004.fm.intel.com with ESMTP; 08 Jul 2023 09:23:59 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1688833441; x=1720369441;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=A00Upl2boDg5RVHF7M6LNeaOxQgU+FZXNaZXJk1dRcE=;\n b=Q2ADA6La5PzO0PeDGd4CCxpU62MHy0eH+7YZzKrxsm1PtY5Zq3KTnrpU\n r2Sr5p59gY2iTEAukATWUG5EHesigqRqLYxQEgRLC+c0sc27PMjOeSUDk\n 4xb5+ANH2rQnUlmqSoaIywI9MO59QYo24X8OPDGlAtlmErl9PX8ThQA56\n w98LX98snJuHx+tAnsqyF0YutRyMCg2tsFhR1aAmvj3DR4YAGjSQnG5sK\n J7uhHpm4wGGHEgAvc2kgnOZA15IvqskWply+0dF7X99Qn4hQJjyItXoiY\n GICYszP9wxdVTmJof4puLNXgRI7mCM8wM5Sxqb6BTaYzeyWUDjBQ6Kk/U A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10765\"; a=\"364114736\"",
            "E=Sophos;i=\"6.01,191,1684825200\"; d=\"scan'208\";a=\"364114736\"",
            "E=McAfee;i=\"6600,9927,10765\"; a=\"790311539\"",
            "E=Sophos;i=\"6.01,191,1684825200\"; d=\"scan'208\";a=\"790311539\""
        ],
        "X-ExtLoop1": "1",
        "From": "Abdullah Sevincer <abdullah.sevincer@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "reshma.pattan@intel.com, stephen@networkplumber.org,\n Abdullah Sevincer <abdullah.sevincer@intel.com>, stable@dpdk.org",
        "Subject": "[PATCH v1] app/procinfo: revise display eventdev xstats",
        "Date": "Sat,  8 Jul 2023 11:23:56 -0500",
        "Message-Id": "<20230708162356.2961843-1-abdullah.sevincer@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "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": "process_eventdev_xstats() function was iterating over\neventdev_var[] structure even if there is no eventdev present.\nRevised the code to check to iterate and only look for the number\nof eventdevs present in the system. Also, shortened function name to\neventdev_xstats().\n\nCoverity issue: 395458\nFixes: 674bb3906931 (\"app/procinfo: display eventdev xstats\")\nCc: stable@dpdk.org\n\nSigned-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>\n---\n app/proc-info/main.c | 29 +++++++++++++++--------------\n 1 file changed, 15 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/app/proc-info/main.c b/app/proc-info/main.c\nindex be63eace69..88cee0ca48 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -2045,19 +2045,16 @@ xstats_reset(uint8_t dev_id,\n \n }\n \n-static int\n-process_eventdev_xstats(void)\n+static unsigned int\n+eventdev_xstats(void)\n {\n-\tint i;\n-\tint j;\n-\tint processing_eventdev_xstats = 0;\n-\n-\tfor (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {\n+\tunsigned int count = 0;\n+\tint i, j;\n \n-\t\tif (!processing_eventdev_xstats)\n-\t\t\tprocessing_eventdev_xstats = 1;\n+\tfor (i = 0; i < rte_event_dev_count(); i++) {\n \n \t\tif (eventdev_var[i].dump_xstats) {\n+\t\t\t++count;\n \t\t\tint ret = rte_event_dev_dump(i, stdout);\n \n \t\t\tif (ret)\n@@ -2065,6 +2062,7 @@ process_eventdev_xstats(void)\n \t\t}\n \n \t\tif (eventdev_var[i].shw_device_xstats == 1) {\n+\t\t\t++count;\n \t\t\txstats_display(i, RTE_EVENT_DEV_XSTATS_DEVICE, 0);\n \n \t\t\tif (eventdev_var[i].reset_xstats == 1)\n@@ -2072,6 +2070,7 @@ process_eventdev_xstats(void)\n \t\t}\n \n \t\tif (eventdev_var[i].shw_all_ports == 1) {\n+\t\t\t++count;\n \t\t\tfor (j = 0; j < MAX_PORTS_QUEUES; j++) {\n \t\t\t\txstats_display(i, RTE_EVENT_DEV_XSTATS_PORT, j);\n \n@@ -2079,6 +2078,8 @@ process_eventdev_xstats(void)\n \t\t\t\t\txstats_reset(i, RTE_EVENT_DEV_XSTATS_PORT, j);\n \t\t\t}\n \t\t} else {\n+\t\t\tif (eventdev_var[i].num_ports > 0)\n+\t\t\t\t++count;\n \t\t\tfor (j = 0; j < eventdev_var[i].num_ports; j++) {\n \t\t\t\txstats_display(i, RTE_EVENT_DEV_XSTATS_PORT,\n \t\t\t\t\teventdev_var[i].ports[j]);\n@@ -2090,6 +2091,7 @@ process_eventdev_xstats(void)\n \t\t}\n \n \t\tif (eventdev_var[i].shw_all_queues == 1) {\n+\t\t\t++count;\n \t\t\tfor (j = 0; j < MAX_PORTS_QUEUES; j++) {\n \t\t\t\txstats_display(i, RTE_EVENT_DEV_XSTATS_QUEUE, j);\n \n@@ -2097,6 +2099,8 @@ process_eventdev_xstats(void)\n \t\t\t\t\txstats_reset(i, RTE_EVENT_DEV_XSTATS_QUEUE, j);\n \t\t\t}\n \t\t} else {\n+\t\t\tif (eventdev_var[i].num_queues > 0)\n+\t\t\t\t++count;\n \t\t\tfor (j = 0; j < eventdev_var[i].num_queues; j++) {\n \t\t\t\txstats_display(i, RTE_EVENT_DEV_XSTATS_QUEUE,\n \t\t\t\t\t\teventdev_var[i].queues[j]);\n@@ -2108,10 +2112,7 @@ process_eventdev_xstats(void)\n \t\t}\n \t}\n \n-\tif (processing_eventdev_xstats)\n-\t\treturn 1;\n-\n-\treturn 0;\n+\treturn count;\n }\n \n int\n@@ -2164,7 +2165,7 @@ main(int argc, char **argv)\n \t\treturn 0;\n \t}\n \n-\tif (process_eventdev_xstats())\n+\tif (eventdev_xstats() > 0)\n \t\treturn 0;\n \n \tnb_ports = rte_eth_dev_count_avail();\n",
    "prefixes": [
        "v1"
    ]
}