get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139417,
    "url": "http://patches.dpdk.org/api/patches/139417/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240416123747.4133884-2-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-2-vvelumuri@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240416123747.4133884-2-vvelumuri@marvell.com",
    "date": "2024-04-16T12:37:47",
    "name": "[v1,2/2] test/dma: add functions to verify zero and one fill",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "cf229925c0b9ddf1dc388ad5d894e73464fd2247",
    "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-2-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/139417/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/139417/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 CB3A043E74;\n\tTue, 16 Apr 2024 14:38:16 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B5923402D0;\n\tTue, 16 Apr 2024 14:38:16 +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 2696E402CF\n for <dev@dpdk.org>; Tue, 16 Apr 2024 14:38:15 +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 43G9k53F032032; Tue, 16 Apr 2024 05:38:14 -0700",
            "from dc5-exch05.marvell.com ([199.233.59.128])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3xhfdn1w6t-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 16 Apr 2024 05:38:14 -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:12 -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:12 -0700",
            "from localhost.localdomain (unknown [10.28.36.179])\n by maili.marvell.com (Postfix) with ESMTP id CDCFF3F708D;\n Tue, 16 Apr 2024 05:38:09 -0700 (PDT)"
        ],
        "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=3GlI/M8kdj3gMF33JDRJ+AakHo2xSzfzE09G7/ZAqD8=; b=dt9\n oODDc/RcpZ+Oy56CmUXHGk23fG+E8j7Yiww4t3KDiLkkY+uATXxnJ7mJ1BDI+ng1\n uOQjs9Cby3xFhrV6NhwUaBg9GEtlQcY4U9L4QyYlB15OP4RpTQmQveKrTKbC/M8s\n hocQszy2s2G0seVmy8zCfjlhYS4Eb97jisF+XIb7OCq513zd71qNnE4wkGg0dH+p\n e4TO6bPKf6z6MiLp7MGMGUc3JsAAnTk4r+RtShxMj5z+aRghKVi9z7OuQkrqSNqA\n zdJvoaxAL/6irfndhjaVOsuH4diQ2bIXVZ+AYCjmaZqNeKeCBqMNi5QlmBpcj/hB\n iDoQvqbwJuKcV9APfaQ==",
        "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 2/2] test/dma: add functions to verify zero and one fill",
        "Date": "Tue, 16 Apr 2024 05:37:47 -0700",
        "Message-ID": "<20240416123747.4133884-2-vvelumuri@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20240416123747.4133884-1-vvelumuri@marvell.com>",
        "References": "<20240416123747.4133884-1-vvelumuri@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "PvNQ3vrFsf0cWMAX_D0zdEUe4UmWAees",
        "X-Proofpoint-ORIG-GUID": "PvNQ3vrFsf0cWMAX_D0zdEUe4UmWAees",
        "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": "Add test cases to verify zero fill and one fill\n\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>",
    "diff": "diff --git a/app/test/test.h b/app/test/test.h\nindex 15e23d297f..0ca6519f6e 100644\n--- a/app/test/test.h\n+++ b/app/test/test.h\n@@ -27,6 +27,10 @@\n \n #include <rte_test.h>\n \n+#ifndef ARRAY_SIZE\n+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))\n+#endif\n+\n #define TEST_ASSERT RTE_TEST_ASSERT\n \n #define TEST_ASSERT_EQUAL RTE_TEST_ASSERT_EQUAL\ndiff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 7462e90831..b21994d592 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -869,42 +869,52 @@ test_completion_handling(int16_t dev_id, uint16_t vchan)\n static int\n test_enqueue_fill(int16_t dev_id, uint16_t vchan)\n {\n+\tuint64_t pattern[3] = {0x0, 0xfedcba9876543210, 0xffffffffffffffff};\n \tconst unsigned int lengths[] = {8, 64, 1024, 50, 100, 89};\n+\tunsigned int i, j, k;\n \tstruct rte_mbuf *dst;\n \tchar *dst_data;\n-\tuint64_t pattern = 0xfedcba9876543210;\n-\tunsigned int i, j;\n \n \tdst = rte_pktmbuf_alloc(pool);\n \tif (dst == NULL)\n \t\tERR_RETURN(\"Failed to allocate mbuf\\n\");\n \tdst_data = rte_pktmbuf_mtod(dst, char *);\n \n-\tfor (i = 0; i < RTE_DIM(lengths); i++) {\n-\t\t/* reset dst_data */\n-\t\tmemset(dst_data, 0, rte_pktmbuf_data_len(dst));\n+\tfor (k = 0; k < ARRAY_SIZE(pattern); k++) {\n+\t\tprintf(\"Test fill pattern: 0x%016lx\\n\", pattern[k]);\n+\t\tfor (i = 0; i < RTE_DIM(lengths); i++) {\n+\t\t\t/* reset dst_data */\n+\t\t\tmemset(dst_data, 0, rte_pktmbuf_data_len(dst));\n+\n+\t\t\t/* perform the fill operation */\n+\t\t\tint id = rte_dma_fill(dev_id, vchan, pattern[k],\n+\t\t\t\t\trte_pktmbuf_iova(dst), lengths[i], RTE_DMA_OP_FLAG_SUBMIT);\n+\t\t\tif (id < 0) {\n+\t\t\t\tif (id == -ENOTSUP) {\n+\t\t\t\t\trte_pktmbuf_free(dst);\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t\tERR_RETURN(\"Error with rte_dma_fill\\n\");\n+\t\t\t}\n+\t\t\tawait_hw(dev_id, vchan);\n \n-\t\t/* perform the fill operation */\n-\t\tint id = rte_dma_fill(dev_id, vchan, pattern,\n-\t\t\t\trte_pktmbuf_iova(dst), lengths[i], RTE_DMA_OP_FLAG_SUBMIT);\n-\t\tif (id < 0)\n-\t\t\tERR_RETURN(\"Error with rte_dma_fill\\n\");\n-\t\tawait_hw(dev_id, vchan);\n+\t\t\tif (rte_dma_completed(dev_id, vchan, 1, NULL, NULL) != 1)\n+\t\t\t\tERR_RETURN(\"Error: fill operation failed (length: %u)\\n\",\n+\t\t\t\t\t   lengths[i]);\n+\t\t\t/* check the data from the fill operation is correct */\n+\t\t\tfor (j = 0; j < lengths[i]; j++) {\n+\t\t\t\tchar pat_byte = ((char *)&pattern[k])[j % 8];\n \n-\t\tif (rte_dma_completed(dev_id, vchan, 1, NULL, NULL) != 1)\n-\t\t\tERR_RETURN(\"Error: fill operation failed (length: %u)\\n\", lengths[i]);\n-\t\t/* check the data from the fill operation is correct */\n-\t\tfor (j = 0; j < lengths[i]; j++) {\n-\t\t\tchar pat_byte = ((char *)&pattern)[j % 8];\n-\t\t\tif (dst_data[j] != pat_byte)\n-\t\t\t\tERR_RETURN(\"Error with fill operation (lengths = %u): got (%x), not (%x)\\n\",\n-\t\t\t\t\t\tlengths[i], dst_data[j], pat_byte);\n+\t\t\t\tif (dst_data[j] != pat_byte)\n+\t\t\t\t\tERR_RETURN(\"Error with fill operation (lengths = %u): got (%x), not (%x)\\n\",\n+\t\t\t\t\t\t\tlengths[i], dst_data[j], pat_byte);\n+\t\t\t}\n+\t\t\t/* check that the data after the fill operation was not written to */\n+\t\t\tfor (; j < rte_pktmbuf_data_len(dst); j++)\n+\t\t\t\tif (dst_data[j] != 0)\n+\t\t\t\t\tERR_RETURN(\"Error, fill operation wrote too far (lengths = %u): got (%x), not (%x)\\n\",\n+\t\t\t\t\t\t\tlengths[i], dst_data[j], 0);\n \t\t}\n-\t\t/* check that the data after the fill operation was not written to */\n-\t\tfor (; j < rte_pktmbuf_data_len(dst); j++)\n-\t\t\tif (dst_data[j] != 0)\n-\t\t\t\tERR_RETURN(\"Error, fill operation wrote too far (lengths = %u): got (%x), not (%x)\\n\",\n-\t\t\t\t\t\tlengths[i], dst_data[j], 0);\n \t}\n \n \trte_pktmbuf_free(dst);\n",
    "prefixes": [
        "v1",
        "2/2"
    ]
}