get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133840,
    "url": "http://patches.dpdk.org/api/patches/133840/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/2c7f6c7b3bec94325c6b96afbd8e9388a1c14a9d.1699025423.git.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": "<2c7f6c7b3bec94325c6b96afbd8e9388a1c14a9d.1699025423.git.gmuthukrishn@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/2c7f6c7b3bec94325c6b96afbd8e9388a1c14a9d.1699025423.git.gmuthukrishn@marvell.com",
    "date": "2023-11-03T15:38:02",
    "name": "[v3,2/3] test/dma: test vchan reconfiguration",
    "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/2c7f6c7b3bec94325c6b96afbd8e9388a1c14a9d.1699025423.git.gmuthukrishn@marvell.com/mbox/",
    "series": [
        {
            "id": 30139,
            "url": "http://patches.dpdk.org/api/series/30139/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30139",
            "date": "2023-11-03T15:38:00",
            "name": "test/dma: add vchan reconfig and SG tests",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/30139/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/133840/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/133840/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 576904327C;\n\tFri,  3 Nov 2023 16:38:26 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0DCE542DD1;\n\tFri,  3 Nov 2023 16:38:20 +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 5DC0A42DD0\n for <dev@dpdk.org>; Fri,  3 Nov 2023 16:38:18 +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 3A3BVgd8010488; Fri, 3 Nov 2023 08:38:17 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3u4m34awnn-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 03 Nov 2023 08:38:17 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Fri, 3 Nov 2023 08:38:15 -0700",
            "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; Fri, 3 Nov 2023 08:38:15 -0700",
            "from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34])\n by maili.marvell.com (Postfix) with ESMTP id B72973F70B2;\n Fri,  3 Nov 2023 08:38:12 -0700 (PDT)"
        ],
        "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=l/G7aoRIJigsPMo2B0IRROZZDkCNsjri+tXp1lPNPaQ=;\n b=SgoeTxkL+hxiLIMsFLsXD4H5w3zCdCipyMIeMPDhG6ElStQSKuSvYMxAJhTx89Wb7HRw\n HXGKsnEHAMEv/Hgy5fHhfJNqp3KfyrGhO69UTIXj8BhckWG55dvOLHiummV+aGErR4f1\n h6Nm3RzmZk9dHZuAM1AOmKYFW6VtO5W9dvY12lLUbm8YLaY+B+hzLhCHzd3ZTdmtHn4n\n TC9N2QcojAdH7wIl48AbVcpNppOejXY6uxB82oa9OUx2iibumq/nR9ICpH+Aiv17ynLX\n p5MAkjQWBY1XEV51rdnUHt9EPvQvKTJefXiGKLw1R24+ulEz+Up4RZS/8qLF1S7qkoKO dQ==",
        "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 v3 2/3] test/dma: test vchan reconfiguration",
        "Date": "Fri, 3 Nov 2023 21:08:02 +0530",
        "Message-ID": "\n <2c7f6c7b3bec94325c6b96afbd8e9388a1c14a9d.1699025423.git.gmuthukrishn@marvell.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<cover.1699025423.git.gmuthukrishn@marvell.com>",
        "References": "<cover.1699025423.git.gmuthukrishn@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "pjTMpEiNhHm-0tff5M4lirPaTY0x8_Mz",
        "X-Proofpoint-GUID": "pjTMpEiNhHm-0tff5M4lirPaTY0x8_Mz",
        "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-03_15,2023-11-02_03,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": "Reconfigure vchan count and validate if new count is effective.\n\nSigned-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.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 da8fddb3ca..aa07d2b359 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": [
        "v3",
        "2/3"
    ]
}