get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97397,
    "url": "http://patches.dpdk.org/api/patches/97397/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210826183301.333442-4-bruce.richardson@intel.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": "<20210826183301.333442-4-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210826183301.333442-4-bruce.richardson@intel.com",
    "date": "2021-08-26T18:32:57",
    "name": "[RFC,3/7] app/test: add basic dmadev instance tests",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "df0173fb1ea756d2b442f5e12ea2967aedff277e",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.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/20210826183301.333442-4-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 18477,
            "url": "http://patches.dpdk.org/api/series/18477/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18477",
            "date": "2021-08-26T18:32:54",
            "name": "add test suite for DMA drivers",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/18477/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/97397/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/97397/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 7C1E6A0C43;\n\tThu, 26 Aug 2021 20:33:37 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B647441250;\n\tThu, 26 Aug 2021 20:33:26 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 3550841250\n for <dev@dpdk.org>; Thu, 26 Aug 2021 20:33:24 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Aug 2021 11:33:23 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by fmsmga006.fm.intel.com with ESMTP; 26 Aug 2021 11:33:22 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10088\"; a=\"217847139\"",
            "E=Sophos;i=\"5.84,354,1620716400\"; d=\"scan'208\";a=\"217847139\"",
            "E=Sophos;i=\"5.84,354,1620716400\"; d=\"scan'208\";a=\"685030816\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "conor.walsh@intel.com, kevin.laatz@intel.com,\n Chengwen Feng <fengchengwen@huawei.com>, jerinj@marvell.com,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu, 26 Aug 2021 19:32:57 +0100",
        "Message-Id": "<20210826183301.333442-4-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210826183301.333442-1-bruce.richardson@intel.com>",
        "References": "<20210826183301.333442-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC PATCH 3/7] app/test: add basic dmadev instance 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": "Run basic sanity tests for configuring, starting and stopping a dmadev instance\nto help validate drivers. This also provides the framework for future tests for\ndata-path operation.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n app/test/test_dmadev.c | 70 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 70 insertions(+)\n\n--\n2.30.2",
    "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 683e024a56..f895556d29 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -12,6 +12,67 @@\n /* from test_dmadev_api.c */\n extern int test_dmadev_api(uint16_t dev_id);\n\n+#define PRINT_ERR(...) print_err(__func__, __LINE__, __VA_ARGS__)\n+\n+static inline int\n+__rte_format_printf(3, 4)\n+print_err(const char *func, int lineno, const char *format, ...)\n+{\n+\tva_list ap;\n+\tint ret;\n+\n+\tret = fprintf(stderr, \"In %s:%d - \", func, lineno);\n+\tva_start(ap, format);\n+\tret += vfprintf(stderr, format, ap);\n+\tva_end(ap);\n+\n+\treturn ret;\n+}\n+\n+static int\n+test_dmadev_instance(uint16_t dev_id)\n+{\n+#define TEST_RINGSIZE 512\n+\t/* Setup of the dmadev device. 8< */\n+\tstruct rte_dmadev_info info;\n+\tconst struct rte_dmadev_conf conf = { .nb_vchans = 1};\n+\tconst struct rte_dmadev_vchan_conf qconf = {\n+\t\t\t.direction = RTE_DMA_DIR_MEM_TO_MEM,\n+\t\t\t.nb_desc = TEST_RINGSIZE,\n+\t};\n+\tconst int vchan = 0;\n+\n+\tprintf(\"\\n### Test dmadev instance %u\\n\", dev_id);\n+\n+\trte_dmadev_info_get(dev_id, &info);\n+\tif (info.max_vchans < 1) {\n+\t\tPRINT_ERR(\"Error, no channels available on device id %u\\n\", dev_id);\n+\t\treturn -1;\n+\t}\n+\tif (rte_dmadev_configure(dev_id, &conf) != 0) {\n+\t\tPRINT_ERR(\"Error with rte_dmadev_configure()\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (rte_dmadev_vchan_setup(dev_id, vchan, &qconf) < 0) {\n+\t\tPRINT_ERR(\"Error with queue configuration\\n\");\n+\t\treturn -1;\n+\t}\n+\t/* >8 End of setup of the dmadev device. */\n+\trte_dmadev_info_get(dev_id, &info);\n+\tif (info.nb_vchans != 1) {\n+\t\tPRINT_ERR(\"Error, no configured queues reported on device id %u\\n\", dev_id);\n+\t\treturn -1;\n+\t}\n+\n+\tif (rte_dmadev_start(dev_id) != 0) {\n+\t\tPRINT_ERR(\"Error with rte_rawdev_start()\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\trte_dmadev_stop(dev_id);\n+\treturn 0;\n+}\n+\n static int\n test_apis(void)\n {\n@@ -34,10 +95,19 @@ test_apis(void)\n static int\n test_dmadev(void)\n {\n+\tint i;\n+\n \t/* basic sanity on dmadev infrastructure */\n \tif (test_apis() < 0)\n \t\treturn -1;\n\n+\tif (rte_dmadev_count() == 0)\n+\t\treturn TEST_SKIPPED;\n+\n+\tfor (i = 0; i < RTE_DMADEV_MAX_DEVS; i++)\n+\t\tif (rte_dmadevices[i].state == RTE_DMADEV_ATTACHED && test_dmadev_instance(i) < 0)\n+\t\t\treturn -1;\n+\n \treturn 0;\n }\n\n",
    "prefixes": [
        "RFC",
        "3/7"
    ]
}