get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 137368,
    "url": "http://patches.dpdk.org/api/patches/137368/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240227183555.3932711-2-amitprakashs@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20240227183555.3932711-2-amitprakashs@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240227183555.3932711-2-amitprakashs@marvell.com",
    "date": "2024-02-27T18:35:52",
    "name": "[v10,1/4] app/dma-perf: add skip support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c6c828ea99e0e313744c6e4a2e8e0f0a847edc25",
    "submitter": {
        "id": 2699,
        "url": "http://patches.dpdk.org/api/people/2699/?format=api",
        "name": "Amit Prakash Shukla",
        "email": "amitprakashs@marvell.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240227183555.3932711-2-amitprakashs@marvell.com/mbox/",
    "series": [
        {
            "id": 31255,
            "url": "http://patches.dpdk.org/api/series/31255/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31255",
            "date": "2024-02-27T18:35:51",
            "name": "PCI Dev and SG copy support",
            "version": 10,
            "mbox": "http://patches.dpdk.org/series/31255/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/137368/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/137368/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 7B3DA43C06;\n\tTue, 27 Feb 2024 19:38:09 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6470640279;\n\tTue, 27 Feb 2024 19:38:09 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 08E6B40150\n for <dev@dpdk.org>; Tue, 27 Feb 2024 19:38:07 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 41RFgnv8005646; Tue, 27 Feb 2024 10:38:07 -0800",
            "from dc5-exch05.marvell.com ([199.233.59.128])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3whjm690b8-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 27 Feb 2024 10:38:07 -0800 (PST)",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH05.marvell.com\n (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Tue, 27 Feb\n 2024 10:38:06 -0800",
            "from DC5-EXCH05.marvell.com (10.69.176.209) by\n DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id\n 15.0.1497.48; Tue, 27 Feb 2024 10:38:05 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com\n (10.69.176.209) with Microsoft SMTP Server id 15.2.1258.12 via Frontend\n Transport; Tue, 27 Feb 2024 10:38:05 -0800",
            "from cavium-OptiPlex-5090-BM14.. (unknown [10.28.36.157])\n by maili.marvell.com (Postfix) with ESMTP id D01F63F70C9;\n Tue, 27 Feb 2024 10:38:01 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding:content-type; s=\n pfpt0220; bh=DW8i0HNylQGRUxBsENpbJ1fd56rGLl0fvJiybIU7a/s=; b=CL+\n 5NKGKVTvdD62FuWH17FKmp0NtHX8dUfG06p7V9W6Uz1szn+1OQTHwcNBdwc/8bMl\n p0inq80qlVLBRBzQPgkb9i3UZTB8i9Kckz8Rr/2if/QkERrpqL63WHTpl6GVYeQT\n azHxhwFkrDfEFUAsBOL/QJMPBWJtMZWAAzaUWLZGxe4leo49l3cYcQvZf3KBfPx3\n KaFgFl6VFvA29Es7UugKcS0GRk+8ppzfFeMDnApMAoRcBYJYoYXdVWfROsY2xOn9\n xSJYOdFIvkY3JFBYOhTE6oemWZxFwrIDli/Vy2+PBfAp9CoMIL1/CfgFRiRgaz4E\n tiQ4TDGR9qyakPDWGuQ==",
        "From": "Amit Prakash Shukla <amitprakashs@marvell.com>",
        "To": "Cheng Jiang <honest.jiang@foxmail.com>, Chengwen Feng\n <fengchengwen@huawei.com>",
        "CC": "<dev@dpdk.org>, <jerinj@marvell.com>, <anoobj@marvell.com>, Kevin Laatz\n <kevin.laatz@intel.com>, Bruce Richardson <bruce.richardson@intel.com>,\n \"Pavan Nikhilesh\" <pbhagavatula@marvell.com>, Gowrishankar Muthukrishnan\n <gmuthukrishn@marvell.com>, Amit Prakash Shukla <amitprakashs@marvell.com>",
        "Subject": "[PATCH v10 1/4] app/dma-perf: add skip support",
        "Date": "Wed, 28 Feb 2024 00:05:52 +0530",
        "Message-ID": "<20240227183555.3932711-2-amitprakashs@marvell.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240227183555.3932711-1-amitprakashs@marvell.com>",
        "References": "<20240227160031.3931694-1-amitprakashs@marvell.com>\n <20240227183555.3932711-1-amitprakashs@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "iWYz1sOuitdgj6PQfb25vnfjKIfLtEIe",
        "X-Proofpoint-GUID": "iWYz1sOuitdgj6PQfb25vnfjKIfLtEIe",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-02-27_05,2024-02-27_01,2023-05-22_02",
        "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": "Add support to skip running a dma-perf test-case.\n\nSigned-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>\nAcked-by: Anoob Joseph <anoobj@marvell.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test-dma-perf/config.ini |  2 ++\n app/test-dma-perf/main.c     | 48 ++++++++++++++++++++++--------------\n app/test-dma-perf/main.h     |  1 +\n 3 files changed, 32 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/app/test-dma-perf/config.ini b/app/test-dma-perf/config.ini\nindex b550f4b23f..4d59234b2a 100644\n--- a/app/test-dma-perf/config.ini\n+++ b/app/test-dma-perf/config.ini\n@@ -36,6 +36,8 @@\n ; If you do not specify a result file, one will be generated with the same name as the configuration\n ; file, with the addition of \"_result.csv\" at the end.\n \n+; \"skip\" To skip a test-case set skip to 1.\n+\n [case1]\n type=DMA_MEM_COPY\n mem_size=10\ndiff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c\nindex 544784df50..e9e40e72e7 100644\n--- a/app/test-dma-perf/main.c\n+++ b/app/test-dma-perf/main.c\n@@ -86,6 +86,19 @@ output_header(uint32_t case_id, struct test_configure *case_cfg)\n \toutput_csv(true);\n }\n \n+static int\n+open_output_csv(const char *rst_path_ptr)\n+{\n+\tfd = fopen(rst_path_ptr, \"a\");\n+\tif (!fd) {\n+\t\tprintf(\"Open output CSV file error.\\n\");\n+\t\treturn 1;\n+\t}\n+\toutput_csv(true);\n+\tfclose(fd);\n+\treturn 0;\n+}\n+\n static void\n run_test_case(struct test_configure *case_cfg)\n {\n@@ -322,6 +335,7 @@ load_configs(const char *path)\n \tconst char *case_type;\n \tconst char *lcore_dma;\n \tconst char *mem_size_str, *buf_size_str, *ring_size_str, *kick_batch_str;\n+\tconst char *skip;\n \tint args_nr, nb_vp;\n \tbool is_dma;\n \n@@ -341,6 +355,13 @@ load_configs(const char *path)\n \tfor (i = 0; i < nb_sections; i++) {\n \t\tsnprintf(section_name, CFG_NAME_LEN, \"case%d\", i + 1);\n \t\ttest_case = &test_cases[i];\n+\n+\t\tskip = rte_cfgfile_get_entry(cfgfile, section_name, \"skip\");\n+\t\tif (skip && (atoi(skip) == 1)) {\n+\t\t\ttest_case->is_skip = true;\n+\t\t\tcontinue;\n+\t\t}\n+\n \t\tcase_type = rte_cfgfile_get_entry(cfgfile, section_name, \"type\");\n \t\tif (case_type == NULL) {\n \t\t\tprintf(\"Error: No case type in case %d, the test will be finished here.\\n\",\n@@ -525,31 +546,20 @@ main(int argc, char *argv[])\n \n \tprintf(\"Running cases...\\n\");\n \tfor (i = 0; i < case_nb; i++) {\n-\t\tif (!test_cases[i].is_valid) {\n-\t\t\tprintf(\"Invalid test case %d.\\n\\n\", i + 1);\n-\t\t\tsnprintf(output_str[0], MAX_OUTPUT_STR_LEN, \"Invalid case %d\\n\", i + 1);\n-\n-\t\t\tfd = fopen(rst_path_ptr, \"a\");\n-\t\t\tif (!fd) {\n-\t\t\t\tprintf(\"Open output CSV file error.\\n\");\n+\t\tif (test_cases[i].is_skip) {\n+\t\t\tprintf(\"Test case %d configured to be skipped.\\n\\n\", i + 1);\n+\t\t\tsnprintf(output_str[0], MAX_OUTPUT_STR_LEN, \"Skip the test-case %d\\n\",\n+\t\t\t\t i + 1);\n+\t\t\tif (open_output_csv(rst_path_ptr))\n \t\t\t\treturn 0;\n-\t\t\t}\n-\t\t\toutput_csv(true);\n-\t\t\tfclose(fd);\n \t\t\tcontinue;\n \t\t}\n \n-\t\tif (test_cases[i].test_type == TEST_TYPE_NONE) {\n-\t\t\tprintf(\"No valid test type in test case %d.\\n\\n\", i + 1);\n+\t\tif (!test_cases[i].is_valid) {\n+\t\t\tprintf(\"Invalid test case %d.\\n\\n\", i + 1);\n \t\t\tsnprintf(output_str[0], MAX_OUTPUT_STR_LEN, \"Invalid case %d\\n\", i + 1);\n-\n-\t\t\tfd = fopen(rst_path_ptr, \"a\");\n-\t\t\tif (!fd) {\n-\t\t\t\tprintf(\"Open output CSV file error.\\n\");\n+\t\t\tif (open_output_csv(rst_path_ptr))\n \t\t\t\treturn 0;\n-\t\t\t}\n-\t\t\toutput_csv(true);\n-\t\t\tfclose(fd);\n \t\t\tcontinue;\n \t\t}\n \ndiff --git a/app/test-dma-perf/main.h b/app/test-dma-perf/main.h\nindex 62085e6e8f..32670151af 100644\n--- a/app/test-dma-perf/main.h\n+++ b/app/test-dma-perf/main.h\n@@ -40,6 +40,7 @@ struct lcore_dma_map_t {\n \n struct test_configure {\n \tbool is_valid;\n+\tbool is_skip;\n \tuint8_t test_type;\n \tconst char *test_type_str;\n \tuint16_t src_numa_node;\n",
    "prefixes": [
        "v10",
        "1/4"
    ]
}