get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134421,
    "url": "http://patches.dpdk.org/api/patches/134421/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231116105917.2060-3-gmuthukrishn@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": "<20231116105917.2060-3-gmuthukrishn@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231116105917.2060-3-gmuthukrishn@marvell.com",
    "date": "2023-11-16T10:59:16",
    "name": "[v6,2/3] test/dma: test multiple vchan",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "26c5804c40db7232fd28afbc20e44e743115a4fd",
    "submitter": {
        "id": 2301,
        "url": "http://patches.dpdk.org/api/people/2301/?format=api",
        "name": "Gowrishankar Muthukrishnan",
        "email": "gmuthukrishn@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231116105917.2060-3-gmuthukrishn@marvell.com/mbox/",
    "series": [
        {
            "id": 30315,
            "url": "http://patches.dpdk.org/api/series/30315/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30315",
            "date": "2023-11-16T10:59:14",
            "name": "test/dma: add vchan reconfig and SG tests",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/30315/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134421/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134421/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 D648043343;\n\tThu, 16 Nov 2023 11:59:48 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5AAB940647;\n\tThu, 16 Nov 2023 11:59:41 +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 643B7402DD\n for <dev@dpdk.org>; Thu, 16 Nov 2023 11:59:38 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3AG9AvZ8007353; Thu, 16 Nov 2023 02:59:37 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uc5vmu95w-3\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 16 Nov 2023 02:59:36 -0800",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 16 Nov 2023 02:59:31 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 16 Nov 2023 02:59:31 -0800",
            "from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34])\n by maili.marvell.com (Postfix) with ESMTP id 527733F7059;\n Thu, 16 Nov 2023 02:59:28 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=T+FL4MqI4bCO9CrdHpxrvey5r6aar3UqVva9jJcZf0c=;\n b=g1sItxgH9mebTrHc8zzW47dxavDHPiBeWtWTICYvDg14aklBuUnwIVlRjaDBKBpkJt5a\n YCIobTgc/gOevefKc43kF0JddsFzf8WZ1QAcmdZsRjq721RHYVBndsomdyjjabvImtQT\n b+yMQKQDkh9NPe85OXvyRL5ciTGUnc/4H95MD9rCOMYcc6ZZoRrDBOly7vO9HRg/MMwE\n Q5Oi9m0LgfdU0Mf795oODxUkkUOuCEyTtmf2OokbI0CMb+sn5PIFiypGCopJ7HDmyUDI\n ERZdQ6C/L00R75h2sUNkzYAGXvoeDw5PkvQ7xwX09ag+AUgsaqHBWKn4wzV2atjxixAU 4Q==",
        "From": "Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<anoobj@marvell.com>, Chengwen Feng <fengchengwen@huawei.com>, \"Vamsi\n Attunuru\" <vattunuru@marvell.com>, Amit Prakash Shukla\n <amitprakashs@marvell.com>, Vidya Sagar Velumuri <vvelumuri@marvell.com>,\n Kevin Laatz <kevin.laatz@intel.com>, Bruce Richardson\n <bruce.richardson@intel.com>, Gowrishankar Muthukrishnan\n <gmuthukrishn@marvell.com>",
        "Subject": "[PATCH v6 2/3] test/dma: test multiple vchan",
        "Date": "Thu, 16 Nov 2023 16:29:16 +0530",
        "Message-ID": "<20231116105917.2060-3-gmuthukrishn@marvell.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20231116105917.2060-1-gmuthukrishn@marvell.com>",
        "References": "<20231116104012.1985-1-gmuthukrishn@marvell.com>\n <20231116105917.2060-1-gmuthukrishn@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "9rr5UMrWtNEQW_0G2dJFSq3WXarQxgOY",
        "X-Proofpoint-GUID": "9rr5UMrWtNEQW_0G2dJFSq3WXarQxgOY",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-11-16_09,2023-11-16_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": "Support API with multiple vchan test.\n\nSigned-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test/test_dmadev_api.c | 63 +++++++++++++++++++++++++++++++++-----\n 1 file changed, 55 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c\nindex 73d4db825a..2b8a4eda62 100644\n--- a/app/test/test_dmadev_api.c\n+++ b/app/test/test_dmadev_api.c\n@@ -260,7 +260,7 @@ test_dma_vchan_setup(void)\n }\n \n static int\n-setup_one_vchan(void)\n+setup_vchan(int nb_vchans)\n {\n \tstruct rte_dma_vchan_conf vchan_conf = { 0 };\n \tstruct rte_dma_info dev_info = { 0 };\n@@ -269,13 +269,15 @@ setup_one_vchan(void)\n \n \tret = rte_dma_info_get(test_dev_id, &dev_info);\n \tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to obtain device info, %d\", ret);\n-\tdev_conf.nb_vchans = 1;\n+\tdev_conf.nb_vchans = nb_vchans;\n \tret = rte_dma_configure(test_dev_id, &dev_conf);\n \tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to configure, %d\", ret);\n \tvchan_conf.direction = RTE_DMA_DIR_MEM_TO_MEM;\n \tvchan_conf.nb_desc = dev_info.min_desc;\n-\tret = rte_dma_vchan_setup(test_dev_id, 0, &vchan_conf);\n-\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup vchan, %d\", ret);\n+\tfor (int i = 0; i < nb_vchans; i++) {\n+\t\tret = rte_dma_vchan_setup(test_dev_id, i, &vchan_conf);\n+\t\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup vchan %d, %d\", i, ret);\n+\t}\n \n \treturn TEST_SUCCESS;\n }\n@@ -294,7 +296,7 @@ test_dma_start_stop(void)\n \tRTE_TEST_ASSERT(ret == -EINVAL, \"Expected -EINVAL, %d\", ret);\n \n \t/* Setup one vchan for later test */\n-\tret = setup_one_vchan();\n+\tret = setup_vchan(1);\n \tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup one vchan, %d\", ret);\n \n \tret = rte_dma_start(test_dev_id);\n@@ -312,6 +314,50 @@ test_dma_start_stop(void)\n \treturn TEST_SUCCESS;\n }\n \n+static int\n+test_dma_reconfigure(void)\n+{\n+\tstruct rte_dma_conf dev_conf = { 0 };\n+\tstruct rte_dma_info dev_info = { 0 };\n+\tuint16_t cfg_vchans;\n+\tint ret;\n+\n+\tret = rte_dma_info_get(test_dev_id, &dev_info);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to obtain device info, %d\", ret);\n+\n+\t/* At least two vchans required for the test */\n+\tif (dev_info.max_vchans < 2)\n+\t\treturn TEST_SKIPPED;\n+\n+\t/* Setup one vchan for later test */\n+\tret = setup_vchan(1);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup one vchan, %d\", ret);\n+\n+\tret = rte_dma_start(test_dev_id);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to start, %d\", ret);\n+\n+\tret = rte_dma_stop(test_dev_id);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to stop, %d\", ret);\n+\n+\t/* Check reconfigure and vchan setup after device stopped */\n+\tcfg_vchans = dev_conf.nb_vchans = (dev_info.max_vchans - 1);\n+\n+\tret = setup_vchan(cfg_vchans);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup one vchan, %d\", ret);\n+\n+\tret = rte_dma_start(test_dev_id);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to start, %d\", ret);\n+\n+\tret = rte_dma_info_get(test_dev_id, &dev_info);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to obtain device info, %d\", ret);\n+\tRTE_TEST_ASSERT_EQUAL(dev_info.nb_vchans, cfg_vchans, \"incorrect reconfiguration\");\n+\n+\tret = rte_dma_stop(test_dev_id);\n+\tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to stop, %d\", ret);\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n static int\n test_dma_stats(void)\n {\n@@ -328,7 +374,7 @@ test_dma_stats(void)\n \tRTE_TEST_ASSERT(ret == -EINVAL, \"Expected -EINVAL, %d\", ret);\n \n \t/* Setup one vchan for later test */\n-\tret = setup_one_vchan();\n+\tret = setup_vchan(1);\n \tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup one vchan, %d\", ret);\n \n \t/* Check for invalid vchan */\n@@ -400,7 +446,7 @@ test_dma_completed(void)\n \tint ret;\n \n \t/* Setup one vchan for later test */\n-\tret = setup_one_vchan();\n+\tret = setup_vchan(1);\n \tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup one vchan, %d\", ret);\n \n \tret = rte_dma_start(test_dev_id);\n@@ -459,7 +505,7 @@ test_dma_completed_status(void)\n \tint ret;\n \n \t/* Setup one vchan for later test */\n-\tret = setup_one_vchan();\n+\tret = setup_vchan(1);\n \tRTE_TEST_ASSERT_SUCCESS(ret, \"Failed to setup one vchan, %d\", ret);\n \n \tret = rte_dma_start(test_dev_id);\n@@ -517,6 +563,7 @@ static struct unit_test_suite dma_api_testsuite = {\n \t\tTEST_CASE(test_dma_configure),\n \t\tTEST_CASE(test_dma_vchan_setup),\n \t\tTEST_CASE(test_dma_start_stop),\n+\t\tTEST_CASE(test_dma_reconfigure),\n \t\tTEST_CASE(test_dma_stats),\n \t\tTEST_CASE(test_dma_dump),\n \t\tTEST_CASE(test_dma_completed),\n",
    "prefixes": [
        "v6",
        "2/3"
    ]
}