get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99576,
    "url": "http://patchwork.dpdk.org/api/patches/99576/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210924102942.2878051-10-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20210924102942.2878051-10-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210924102942.2878051-10-bruce.richardson@intel.com",
    "date": "2021-09-24T10:29:42",
    "name": "[v6,09/13] app/test: add more comprehensive dmadev copy tests",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "187d85e386c685e0b630fec27eb2e1be9372f67f",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210924102942.2878051-10-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 19138,
            "url": "http://patchwork.dpdk.org/api/series/19138/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19138",
            "date": "2021-09-24T10:29:33",
            "name": "add test suite for DMA drivers",
            "version": 6,
            "mbox": "http://patchwork.dpdk.org/series/19138/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/99576/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/99576/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 58444A0548;\n\tFri, 24 Sep 2021 12:30:46 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EDED741323;\n\tFri, 24 Sep 2021 12:30:20 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 283C141323\n for <dev@dpdk.org>; Fri, 24 Sep 2021 12:30:18 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Sep 2021 03:30:18 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by orsmga006.jf.intel.com with ESMTP; 24 Sep 2021 03:30:16 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10116\"; a=\"203541185\"",
            "E=Sophos;i=\"5.85,319,1624345200\"; d=\"scan'208\";a=\"203541185\"",
            "E=Sophos;i=\"5.85,319,1624345200\"; d=\"scan'208\";a=\"436117860\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "conor.walsh@intel.com, kevin.laatz@intel.com, fengchengwen@huawei.com,\n jerinj@marvell.com, Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri, 24 Sep 2021 11:29:42 +0100",
        "Message-Id": "<20210924102942.2878051-10-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210924102942.2878051-1-bruce.richardson@intel.com>",
        "References": "<20210826183301.333442-1-bruce.richardson@intel.com>\n <20210924102942.2878051-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 09/13] app/test: add more comprehensive dmadev\n copy tests",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add unit tests for various combinations of use for dmadev, copying\nbursts of packets in various formats, e.g.\n\n1. enqueuing two smaller bursts and completing them as one burst\n2. enqueuing one burst and gathering completions in smaller bursts\n3. using completed_status() function to gather completions rather than\n   just completed()\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nReviewed-by: Kevin Laatz <kevin.laatz@intel.com>\nReviewed-by: Conor Walsh <conor.walsh@intel.com>\n---\n app/test/test_dmadev.c | 101 ++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 100 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex c26329e63d..0aecfa6289 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -83,6 +83,98 @@ await_hw(int dev_id, uint16_t vchan)\n \t}\n }\n \n+/* run a series of copy tests just using some different options for enqueues and completions */\n+static int\n+do_multi_copies(int dev_id, uint16_t vchan,\n+\t\tint split_batches,     /* submit 2 x 16 or 1 x 32 burst */\n+\t\tint split_completions, /* gather 2 x 16 or 1 x 32 completions */\n+\t\tint use_completed_status) /* use completed or completed_status function */\n+{\n+\tstruct rte_mbuf *srcs[32], *dsts[32];\n+\tenum rte_dma_status_code sc[32];\n+\tunsigned int i, j;\n+\tbool dma_err = false;\n+\n+\t/* Enqueue burst of copies and hit doorbell */\n+\tfor (i = 0; i < RTE_DIM(srcs); i++) {\n+\t\tuint64_t *src_data;\n+\n+\t\tif (split_batches && i == RTE_DIM(srcs) / 2)\n+\t\t\trte_dma_submit(dev_id, vchan);\n+\n+\t\tsrcs[i] = rte_pktmbuf_alloc(pool);\n+\t\tdsts[i] = rte_pktmbuf_alloc(pool);\n+\t\tif (srcs[i] == NULL || dsts[i] == NULL)\n+\t\t\tERR_RETURN(\"Error allocating buffers\\n\");\n+\n+\t\tsrc_data = rte_pktmbuf_mtod(srcs[i], uint64_t *);\n+\t\tfor (j = 0; j < COPY_LEN/sizeof(uint64_t); j++)\n+\t\t\tsrc_data[j] = rte_rand();\n+\n+\t\tif (rte_dma_copy(dev_id, vchan, srcs[i]->buf_iova + srcs[i]->data_off,\n+\t\t\t\tdsts[i]->buf_iova + dsts[i]->data_off, COPY_LEN, 0) != id_count++)\n+\t\t\tERR_RETURN(\"Error with rte_dma_copy for buffer %u\\n\", i);\n+\t}\n+\trte_dma_submit(dev_id, vchan);\n+\n+\tawait_hw(dev_id, vchan);\n+\n+\tif (split_completions) {\n+\t\t/* gather completions in two halves */\n+\t\tuint16_t half_len = RTE_DIM(srcs) / 2;\n+\t\tint ret = rte_dma_completed(dev_id, vchan, half_len, NULL, &dma_err);\n+\t\tif (ret != half_len || dma_err)\n+\t\t\tERR_RETURN(\"Error with rte_dma_completed - first half. ret = %d, expected ret = %u, dma_err = %d\\n\",\n+\t\t\t\t\tret, half_len, dma_err);\n+\n+\t\tret = rte_dma_completed(dev_id, vchan, half_len, NULL, &dma_err);\n+\t\tif (ret != half_len || dma_err)\n+\t\t\tERR_RETURN(\"Error with rte_dma_completed - second half. ret = %d, expected ret = %u, dma_err = %d\\n\",\n+\t\t\t\t\tret, half_len, dma_err);\n+\t} else {\n+\t\t/* gather all completions in one go, using either\n+\t\t * completed or completed_status fns\n+\t\t */\n+\t\tif (!use_completed_status) {\n+\t\t\tint n = rte_dma_completed(dev_id, vchan, RTE_DIM(srcs), NULL, &dma_err);\n+\t\t\tif (n != RTE_DIM(srcs) || dma_err)\n+\t\t\t\tERR_RETURN(\"Error with rte_dma_completed, %u [expected: %zu], dma_err = %d\\n\",\n+\t\t\t\t\t\tn, RTE_DIM(srcs), dma_err);\n+\t\t} else {\n+\t\t\tint n = rte_dma_completed_status(dev_id, vchan, RTE_DIM(srcs), NULL, sc);\n+\t\t\tif (n != RTE_DIM(srcs))\n+\t\t\t\tERR_RETURN(\"Error with rte_dma_completed_status, %u [expected: %zu]\\n\",\n+\t\t\t\t\t\tn, RTE_DIM(srcs));\n+\n+\t\t\tfor (j = 0; j < (uint16_t)n; j++)\n+\t\t\t\tif (sc[j] != RTE_DMA_STATUS_SUCCESSFUL)\n+\t\t\t\t\tERR_RETURN(\"Error with rte_dma_completed_status, job %u reports failure [code %u]\\n\",\n+\t\t\t\t\t\t\tj, sc[j]);\n+\t\t}\n+\t}\n+\n+\t/* check for empty */\n+\tint ret = use_completed_status ?\n+\t\t\trte_dma_completed_status(dev_id, vchan, RTE_DIM(srcs), NULL, sc) :\n+\t\t\trte_dma_completed(dev_id, vchan, RTE_DIM(srcs), NULL, &dma_err);\n+\tif (ret != 0)\n+\t\tERR_RETURN(\"Error with completion check - ops unexpectedly returned\\n\");\n+\n+\tfor (i = 0; i < RTE_DIM(srcs); i++) {\n+\t\tchar *src_data, *dst_data;\n+\n+\t\tsrc_data = rte_pktmbuf_mtod(srcs[i], char *);\n+\t\tdst_data = rte_pktmbuf_mtod(dsts[i], char *);\n+\t\tfor (j = 0; j < COPY_LEN; j++)\n+\t\t\tif (src_data[j] != dst_data[j])\n+\t\t\t\tERR_RETURN(\"Error with copy of packet %u, byte %u\\n\", i, j);\n+\n+\t\trte_pktmbuf_free(srcs[i]);\n+\t\trte_pktmbuf_free(dsts[i]);\n+\t}\n+\treturn 0;\n+}\n+\n static int\n test_enqueue_copies(int dev_id, uint16_t vchan)\n {\n@@ -177,7 +269,14 @@ test_enqueue_copies(int dev_id, uint16_t vchan)\n \t\trte_pktmbuf_free(dst);\n \t} while (0);\n \n-\treturn 0;\n+\t/* test doing multiple copies */\n+\treturn do_multi_copies(dev_id, vchan, 0, 0, 0) /* enqueue and complete 1 batch at a time */\n+\t\t\t/* enqueue 2 batches and then complete both */\n+\t\t\t|| do_multi_copies(dev_id, vchan, 1, 0, 0)\n+\t\t\t/* enqueue 1 batch, then complete in two halves */\n+\t\t\t|| do_multi_copies(dev_id, vchan, 0, 1, 0)\n+\t\t\t/* test using completed_status in place of regular completed API */\n+\t\t\t|| do_multi_copies(dev_id, vchan, 0, 0, 1);\n }\n \n static int\n",
    "prefixes": [
        "v6",
        "09/13"
    ]
}