get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139416,
    "url": "http://patches.dpdk.org/api/patches/139416/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240416123747.4133884-1-vvelumuri@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": "<20240416123747.4133884-1-vvelumuri@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240416123747.4133884-1-vvelumuri@marvell.com",
    "date": "2024-04-16T12:37:46",
    "name": "[v1,1/2] test/dma: update the sg test to verify wrap around case",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a1e91176cbf167a5bff3703bc92473222c6a9173",
    "submitter": {
        "id": 2363,
        "url": "http://patches.dpdk.org/api/people/2363/?format=api",
        "name": "Vidya Sagar Velumuri",
        "email": "vvelumuri@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/20240416123747.4133884-1-vvelumuri@marvell.com/mbox/",
    "series": [
        {
            "id": 31754,
            "url": "http://patches.dpdk.org/api/series/31754/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31754",
            "date": "2024-04-16T12:37:46",
            "name": "[v1,1/2] test/dma: update the sg test to verify wrap around case",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/31754/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/139416/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/139416/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 0238643E74;\n\tTue, 16 Apr 2024 14:38:10 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5FCE24029E;\n\tTue, 16 Apr 2024 14:38:10 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 0A62840262\n for <dev@dpdk.org>; Tue, 16 Apr 2024 14:38:07 +0200 (CEST)",
            "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 43G9kCjx032152; Tue, 16 Apr 2024 05:38:07 -0700",
            "from dc5-exch05.marvell.com ([199.233.59.128])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3xhfdn1w5v-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 16 Apr 2024 05:38:06 -0700 (PDT)",
            "from DC5-EXCH05.marvell.com (10.69.176.209) by\n DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1544.4; Tue, 16 Apr 2024 05:38:05 -0700",
            "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.1544.4 via Frontend\n Transport; Tue, 16 Apr 2024 05:38:05 -0700",
            "from localhost.localdomain (unknown [10.28.36.179])\n by maili.marvell.com (Postfix) with ESMTP id D38623F70BD;\n Tue, 16 Apr 2024 05:38:01 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding:content-type; s=pfpt0220; bh=khNTjrQS\n kviwuLoEEbQGYL/8d/+Jfd2O+yXtGe3eXMg=; b=g8LfcX97L3pEXV0iqJBICubR\n SidLLQAJy+cSNZJAuDht2nUg4iIHHzHa+151extu1KCQ3MrtB2b2zvonKPQCnRRE\n fLDTCWug97COSvr+a3sb8H5v3pyDYTLBrV3fOMefpOp7MVTIxn7lYu4+GYjSUv7o\n +dCmwrn1Ug4iCIA2lUP/s2H2hm4dm0pmXiW2lqi4ArT9f7CQ5SrJoA+zgC2z52pT\n W3uWypnR4xcuvKgKZidPPkxHTyItnsGz2hfRUfCpPyXzh1nOJvCdpLM2dZ1lM4xi\n QEyrYrMy21m46mQNgU1xI5ry4ejJDa7nWAFpflN/aEcSK9X5nxJpExnOQaNnIA==",
        "From": "Vidya Sagar Velumuri <vvelumuri@marvell.com>",
        "To": "Chengwen Feng <fengchengwen@huawei.com>, Kevin Laatz\n <kevin.laatz@intel.com>, Bruce Richardson <bruce.richardson@intel.com>",
        "CC": "<jerinj@marvell.com>, <anoobj@marvell.com>, <vvelumuri@marvell.com>,\n <asasidharan@marvell.com>, <ktejasree@marvell.com>,\n <gmuthukrishn@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH v1 1/2] test/dma: update the sg test to verify wrap around\n case",
        "Date": "Tue, 16 Apr 2024 05:37:46 -0700",
        "Message-ID": "<20240416123747.4133884-1-vvelumuri@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "P6agglHfnH2k51VHhkCJ5xM1HgR7dz_P",
        "X-Proofpoint-ORIG-GUID": "P6agglHfnH2k51VHhkCJ5xM1HgR7dz_P",
        "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-04-16_08,2024-04-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": "Run the sg test in a loop to verify wrap around case.\nTotal number commands submitted to be more than the number descriptors\nallocated to verify the scenario.\n\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>",
    "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 143e1bcd68..7462e90831 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -393,34 +393,26 @@ test_stop_start(int16_t dev_id, uint16_t vchan)\n }\n \n static int\n-test_enqueue_sg_copies(int16_t dev_id, uint16_t vchan)\n+test_enqueue_sg(int16_t dev_id, uint16_t vchan, unsigned int n_sge, unsigned int test_len)\n {\n-\tunsigned int src_len, dst_len, n_sge, len, i, j, k;\n \tchar orig_src[COPY_LEN], orig_dst[COPY_LEN];\n-\tstruct rte_dma_info info = { 0 };\n+\tunsigned int src_len, dst_len, i, j, k;\n \tenum rte_dma_status_code status;\n \tuint16_t id, n_src, n_dst;\n \n-\tif (rte_dma_info_get(dev_id, &info) < 0)\n-\t\tERR_RETURN(\"Failed to get dev info\");\n-\n-\tif (info.max_sges < 2)\n-\t\tERR_RETURN(\"Test needs minimum 2 SG pointers\");\n-\n-\tn_sge = info.max_sges;\n-\n \tfor (n_src = 1; n_src <= n_sge; n_src++) {\n \t\tfor (n_dst = 1; n_dst <= n_sge; n_dst++) {\n \t\t\t/* Normalize SG buffer lengths */\n-\t\t\tlen = COPY_LEN;\n-\t\t\tlen -= (len % (n_src * n_dst));\n-\t\t\tdst_len = len / n_dst;\n-\t\t\tsrc_len = len / n_src;\n-\n+\t\t\tunsigned int len = test_len - (test_len % (n_src * n_dst));\n \t\t\tstruct rte_dma_sge sg_src[n_sge], sg_dst[n_sge];\n \t\t\tstruct rte_mbuf *src[n_sge], *dst[n_sge];\n \t\t\tchar *src_data[n_sge], *dst_data[n_sge];\n \n+\t\t\tdst_len = len / n_dst;\n+\t\t\tsrc_len = len / n_src;\n+\t\t\tif (dst_len == 0 || src_len == 0)\n+\t\t\t\tcontinue;\n+\n \t\t\tfor (i = 0 ; i < len; i++)\n \t\t\t\torig_src[i] = rte_rand() & 0xFF;\n \n@@ -511,6 +503,27 @@ test_enqueue_sg_copies(int16_t dev_id, uint16_t vchan)\n \treturn 0;\n }\n \n+static int\n+test_enqueue_sg_copies(int16_t dev_id, uint16_t vchan)\n+{\n+\tstruct rte_dma_info info = { 0 };\n+\tunsigned int n_sge, len;\n+\tint loop_count = 0;\n+\n+\tif (rte_dma_info_get(dev_id, &info) < 0)\n+\t\tERR_RETURN(\"Failed to get dev info\");\n+\n+\tn_sge = RTE_MIN(info.max_sges, TEST_SG_MAX);\n+\tlen = COPY_LEN;\n+\n+\tdo {\n+\t\ttest_enqueue_sg(dev_id, vchan, n_sge, len);\n+\t\tloop_count++;\n+\t} while (loop_count * n_sge * n_sge < TEST_RINGSIZE * 3);\n+\n+\treturn 0;\n+}\n+\n /* Failure handling test cases - global macros and variables for those tests*/\n #define COMP_BURST_SZ\t16\n #define OPT_FENCE(idx) ((fence && idx == 8) ? RTE_DMA_OP_FLAG_FENCE : 0)\ndiff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c\nindex d40c05cfbf..6a07ed593b 100644\n--- a/app/test/test_dmadev_api.c\n+++ b/app/test/test_dmadev_api.c\n@@ -16,7 +16,6 @@ extern int test_dma_api(uint16_t dev_id);\n \n #define TEST_MEMCPY_SIZE\t1024\n #define TEST_WAIT_US_VAL\t50000\n-#define TEST_SG_MAX\t\t64\n \n static int16_t test_dev_id;\n static int16_t invalid_dev_id;\ndiff --git a/app/test/test_dmadev_api.h b/app/test/test_dmadev_api.h\nindex 33fbc5bd41..a03f7acd4f 100644\n--- a/app/test/test_dmadev_api.h\n+++ b/app/test/test_dmadev_api.h\n@@ -2,4 +2,6 @@\n  * Copyright(c) 2021 HiSilicon Limited\n  */\n \n+#define TEST_SG_MAX\t\t64\n+\n int test_dma_api(uint16_t dev_id);\n",
    "prefixes": [
        "v1",
        "1/2"
    ]
}