get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134530,
    "url": "http://patches.dpdk.org/api/patches/134530/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/db2aa676958eff4dfea2390ade5dde21a412e5bb.1700650397.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": "<db2aa676958eff4dfea2390ade5dde21a412e5bb.1700650397.git.gmuthukrishn@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/db2aa676958eff4dfea2390ade5dde21a412e5bb.1700650397.git.gmuthukrishn@marvell.com",
    "date": "2023-11-22T11:06:08",
    "name": "[v8,3/4] app/dma-perf: validate copied memory",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dabc93e2518fade5c6015b0327e15119f2f642d5",
    "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/db2aa676958eff4dfea2390ade5dde21a412e5bb.1700650397.git.gmuthukrishn@marvell.com/mbox/",
    "series": [
        {
            "id": 30357,
            "url": "http://patches.dpdk.org/api/series/30357/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30357",
            "date": "2023-11-22T11:06:05",
            "name": "PCI Dev and SG copy support",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/30357/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134530/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134530/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 EB4974339B;\n\tWed, 22 Nov 2023 12:06:42 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BA9CB40DF5;\n\tWed, 22 Nov 2023 12:06:32 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id A43C840DF5\n for <dev@dpdk.org>; Wed, 22 Nov 2023 12:06:31 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3ALMF9Fa012979; Wed, 22 Nov 2023 03:06:30 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3uh1jbb165-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 22 Nov 2023 03:06:30 -0800",
            "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 Wed, 22 Nov 2023 03:06:28 -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; Wed, 22 Nov 2023 03:06:29 -0800",
            "from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34])\n by maili.marvell.com (Postfix) with ESMTP id 48B8C3F7057;\n Wed, 22 Nov 2023 03:06:26 -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=pM+C3IpKyqzDthBdp3Lvfj31K3nbXUA2HDiIebG9ZnY=;\n b=XIAiEgb0ezkTRR0QiCO0UO6+nKFopreWFSfWFrIdcBqP0zsynkFY9vzz3NT5hOQ2AAUN\n PFy4WZI1w7543RD6d5hU+IRO16gf4NL2MMcSm7vL5CxLXRD71EBXOHwv6z609ypwhPId\n ZNF7gW299mGdtPdw14FkizSo4hVaUninmHcbvPREkYaOgJpPQlQ6CClj6VcIEi68DaP/\n rUfx/WwuJDdlbkrfKXqqtCs9v+NCCqSj3k/9pEZCZ4RhuL8oCPNggATVyCECFZ/Ct9Wd\n xyANRuwPJv81UgHwUHJE8DuwJB1pot3TWCp47aRuL4loPZD6Q0qPvKD675omnvaQIwhx 3g==",
        "From": "Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<anoobj@marvell.com>, Cheng Jiang <honest.jiang@foxmail.com>, Kevin Laatz\n <kevin.laatz@intel.com>, Bruce Richardson <bruce.richardson@intel.com>,\n \"Pavan Nikhilesh\" <pbhagavatula@marvell.com>, Amit Prakash Shukla\n <amitprakashs@marvell.com>, Chengwen Feng <fengchengwen@huawei.com>,\n Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "Subject": "[PATCH v8 3/4] app/dma-perf: validate copied memory",
        "Date": "Wed, 22 Nov 2023 16:36:08 +0530",
        "Message-ID": "\n <db2aa676958eff4dfea2390ade5dde21a412e5bb.1700650397.git.gmuthukrishn@marvell.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<cover.1700650397.git.gmuthukrishn@marvell.com>",
        "References": "<cover.1700650397.git.gmuthukrishn@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "dztGYG6oDOKlICdYcRJ9pp65xfKCPSmi",
        "X-Proofpoint-GUID": "dztGYG6oDOKlICdYcRJ9pp65xfKCPSmi",
        "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-22_06,2023-11-22_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": "Validate copied memory to ensure DMA copy did not fail.\n\nSigned-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>\nAcked-by: Anoob Joseph <anoobj@marvell.com>\n---\n app/test-dma-perf/benchmark.c | 21 ++++++++++++++++++++-\n app/test-dma-perf/main.c      | 16 +++++++++++-----\n app/test-dma-perf/main.h      |  2 +-\n 3 files changed, 32 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c\nindex eaed224c67..034461da4e 100644\n--- a/app/test-dma-perf/benchmark.c\n+++ b/app/test-dma-perf/benchmark.c\n@@ -12,6 +12,7 @@\n #include <rte_dmadev.h>\n #include <rte_malloc.h>\n #include <rte_lcore.h>\n+#include <rte_random.h>\n \n #include \"main.h\"\n \n@@ -406,6 +407,11 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs,\n \t\treturn -1;\n \t}\n \n+\tfor (i = 0; i < nr_buf; i++) {\n+\t\tmemset(rte_pktmbuf_mtod((*srcs)[i], void *), rte_rand(), buf_size);\n+\t\tmemset(rte_pktmbuf_mtod((*dsts)[i], void *), 0, buf_size);\n+\t}\n+\n \tif (cfg->transfer_dir == RTE_DMA_DIR_DEV_TO_MEM ||\n \t    cfg->transfer_dir == RTE_DMA_DIR_MEM_TO_DEV) {\n \t\text_buf_info = rte_malloc(NULL, sizeof(struct rte_mbuf_ext_shared_info), 0);\n@@ -440,7 +446,7 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs,\n \treturn 0;\n }\n \n-void\n+int\n mem_copy_benchmark(struct test_configure *cfg, bool is_dma)\n {\n \tuint32_t i;\n@@ -458,6 +464,7 @@ mem_copy_benchmark(struct test_configure *cfg, bool is_dma)\n \tuint32_t avg_cycles_total;\n \tfloat mops, mops_total;\n \tfloat bandwidth, bandwidth_total;\n+\tint ret = 0;\n \n \tif (setup_memory_env(cfg, &srcs, &dsts) < 0)\n \t\tgoto out;\n@@ -531,6 +538,16 @@ mem_copy_benchmark(struct test_configure *cfg, bool is_dma)\n \n \trte_eal_mp_wait_lcore();\n \n+\tfor (i = 0; i < (nr_buf / nb_workers) * nb_workers; i++) {\n+\t\tif (memcmp(rte_pktmbuf_mtod(srcs[i], void *),\n+\t\t\t   rte_pktmbuf_mtod(dsts[i], void *),\n+\t\t\t   cfg->buf_size.cur) != 0) {\n+\t\t\tprintf(\"Copy validation fails for buffer number %d\\n\", i);\n+\t\t\tret = -1;\n+\t\t\tgoto out;\n+\t\t}\n+\t}\n+\n \tmops_total = 0;\n \tbandwidth_total = 0;\n \tavg_cycles_total = 0;\n@@ -596,4 +613,6 @@ mem_copy_benchmark(struct test_configure *cfg, bool is_dma)\n \t\t\trte_dma_stop(ldm->dma_ids[i]);\n \t\t}\n \t}\n+\n+\treturn ret;\n }\ndiff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c\nindex 3eddf2e40a..1d54173a9c 100644\n--- a/app/test-dma-perf/main.c\n+++ b/app/test-dma-perf/main.c\n@@ -100,20 +100,24 @@ open_output_csv(const char *rst_path_ptr)\n \treturn 0;\n }\n \n-static void\n+static int\n run_test_case(struct test_configure *case_cfg)\n {\n+\tint ret = 0;\n+\n \tswitch (case_cfg->test_type) {\n \tcase TEST_TYPE_DMA_MEM_COPY:\n-\t\tmem_copy_benchmark(case_cfg, true);\n+\t\tret = mem_copy_benchmark(case_cfg, true);\n \t\tbreak;\n \tcase TEST_TYPE_CPU_MEM_COPY:\n-\t\tmem_copy_benchmark(case_cfg, false);\n+\t\tret = mem_copy_benchmark(case_cfg, false);\n \t\tbreak;\n \tdefault:\n \t\tprintf(\"Unknown test type. %s\\n\", case_cfg->test_type_str);\n \t\tbreak;\n \t}\n+\n+\treturn ret;\n }\n \n static void\n@@ -158,8 +162,10 @@ run_test(uint32_t case_id, struct test_configure *case_cfg)\n \t\tcase_cfg->scenario_id++;\n \t\tprintf(\"\\nRunning scenario %d\\n\", case_cfg->scenario_id);\n \n-\t\trun_test_case(case_cfg);\n-\t\toutput_csv(false);\n+\t\tif (run_test_case(case_cfg) < 0)\n+\t\t\tprintf(\"\\nTest fails! skipping this scenario.\\n\");\n+\t\telse\n+\t\t\toutput_csv(false);\n \n \t\tif (var_entry->op == OP_ADD)\n \t\t\tvar_entry->cur += var_entry->incr;\ndiff --git a/app/test-dma-perf/main.h b/app/test-dma-perf/main.h\nindex 8ac3270fba..7dcaa166f2 100644\n--- a/app/test-dma-perf/main.h\n+++ b/app/test-dma-perf/main.h\n@@ -65,6 +65,6 @@ struct test_configure {\n \tuintptr_t raddr;\n };\n \n-void mem_copy_benchmark(struct test_configure *cfg, bool is_dma);\n+int mem_copy_benchmark(struct test_configure *cfg, bool is_dma);\n \n #endif /* MAIN_H */\n",
    "prefixes": [
        "v8",
        "3/4"
    ]
}