get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84060,
    "url": "http://patches.dpdk.org/api/patches/84060/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201112134754.96530-1-Cheng1.jiang@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": "<20201112134754.96530-1-Cheng1.jiang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201112134754.96530-1-Cheng1.jiang@intel.com",
    "date": "2020-11-12T13:47:54",
    "name": "[v4] examples/vhost: fix ioat dependency issue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5e68c389f75e0ec2f3695f642b82160ff60b3578",
    "submitter": {
        "id": 1530,
        "url": "http://patches.dpdk.org/api/people/1530/?format=api",
        "name": "Jiang, Cheng1",
        "email": "Cheng1.jiang@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201112134754.96530-1-Cheng1.jiang@intel.com/mbox/",
    "series": [
        {
            "id": 13842,
            "url": "http://patches.dpdk.org/api/series/13842/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13842",
            "date": "2020-11-12T13:47:54",
            "name": "[v4] examples/vhost: fix ioat dependency issue",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/13842/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/84060/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/84060/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5354AA09D3;\n\tThu, 12 Nov 2020 14:56:49 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 362DB56A3;\n\tThu, 12 Nov 2020 14:56:48 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id DBCA44CA6\n for <dev@dpdk.org>; Thu, 12 Nov 2020 14:56:45 +0100 (CET)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Nov 2020 05:56:43 -0800",
            "from dpdk_jiangcheng.sh.intel.com ([10.67.119.112])\n by fmsmga007.fm.intel.com with ESMTP; 12 Nov 2020 05:56:40 -0800"
        ],
        "IronPort-SDR": [
            "\n i+Ap3Yu6IDjF41At4/ZTYWfto+epalc6CNWacC1lfSe3/C6A9KU1EPzgf1p6zU3HDxvVCzlL/T\n C2fvLikKUf9Q==",
            "\n 1kbShqS6KVPR1pUQWuQDQrBW4VIR5l+Ae+/nQ32V4TC/PDxJXZ8wWEEACBxclxqU18qUdQde3l\n 4I//mO/qDeug=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9802\"; a=\"169523771\"",
            "E=Sophos;i=\"5.77,472,1596524400\"; d=\"scan'208\";a=\"169523771\"",
            "E=Sophos;i=\"5.77,472,1596524400\"; d=\"scan'208\";a=\"309227224\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Cheng Jiang <Cheng1.jiang@intel.com>",
        "To": "maxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com",
        "Cc": "dev@dpdk.org, patrick.fu@intel.com, YvonneX.Yang@intel.com,\n david.marchand@redhat.com, bruce.richardson@intel.com, Jiayu.Hu@intel.com,\n Cheng Jiang <Cheng1.jiang@intel.com>",
        "Date": "Thu, 12 Nov 2020 13:47:54 +0000",
        "Message-Id": "<20201112134754.96530-1-Cheng1.jiang@intel.com>",
        "X-Mailer": "git-send-email 2.29.2",
        "In-Reply-To": "<20201111111957.46090-1-Cheng1.jiang@intel.com>",
        "References": "<20201111111957.46090-1-Cheng1.jiang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4] examples/vhost: fix ioat dependency issue",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "Fix vhost-switch compiling issue when ioat dependency is missing.\nChange 'RTE_x86' check into 'RTE_RAW_IOAT' check in meson build file.\nUse 'RTE_RAW_IOAT' to control conditional compiling in source file.\nClean some codes.\n\nFixes: abec60e7115d (\"examples/vhost: support vhost async data path\")\nFixes: 3a04ecb21420 (\"examples/vhost: add async vhost args parsing\")\n\nSigned-off-by: Cheng Jiang <Cheng1.jiang@intel.com>\n---\nv4:\n * Use macros in ioat.c for conditional compilation instead of changing Makefile.\n\nv3:\n * Added fixes lines in commit log.\n\nv2:\n * Cleaned some codes\n * Changed RTE_RAW_IOAT check method in Makefile\n * Added ioat function definition when RTE_RAW_IOAT is missing\n\n examples/vhost/Makefile    |  2 +-\n examples/vhost/ioat.c      |  6 ++++++\n examples/vhost/ioat.h      | 32 +++++++++++++++++++++++++-------\n examples/vhost/main.c      | 22 +++++++++++-----------\n examples/vhost/meson.build |  2 +-\n 5 files changed, 44 insertions(+), 20 deletions(-)\n\n--\n2.29.2",
    "diff": "diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile\nindex cec59d0e0..8c969caaa 100644\n--- a/examples/vhost/Makefile\n+++ b/examples/vhost/Makefile\n@@ -5,7 +5,7 @@\n APP = vhost-switch\n\n # all source are stored in SRCS-y\n-SRCS-y := main.c virtio_net.c\n+SRCS-y := main.c virtio_net.c ioat.c\n\n # Build using pkg-config variables if possible\n ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)\ndiff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c\nindex b2c74f653..6f87d7bba 100644\n--- a/examples/vhost/ioat.c\n+++ b/examples/vhost/ioat.c\n@@ -1,13 +1,17 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n  * Copyright(c) 2010-2020 Intel Corporation\n  */\n+#ifdef RTE_RAW_IOAT\n #include <rte_rawdev.h>\n #include <rte_ioat_rawdev.h>\n+#endif /* RTE_RAW_IOAT */\n #include <sys/uio.h>\n\n #include \"ioat.h\"\n #include \"main.h\"\n\n+#ifdef RTE_RAW_IOAT\n+\n struct dma_for_vhost dma_bind[MAX_VHOST_DEVICE];\n\n struct packet_tracker {\n@@ -199,3 +203,5 @@ ioat_check_completed_copies_cb(int vid, uint16_t queue_id,\n \t/* Opaque data is not supported */\n \treturn -1;\n }\n+\n+#endif /* RTE_RAW_IOAT */\ndiff --git a/examples/vhost/ioat.h b/examples/vhost/ioat.h\nindex 9664fcc3a..d6e1e2e07 100644\n--- a/examples/vhost/ioat.h\n+++ b/examples/vhost/ioat.h\n@@ -24,14 +24,8 @@ struct dma_for_vhost {\n \tuint16_t nr;\n };\n\n-#ifdef RTE_ARCH_X86\n+#ifdef RTE_RAW_IOAT\n int open_ioat(const char *value);\n-#else\n-static int open_ioat(const char *value __rte_unused)\n-{\n-\treturn -1;\n-}\n-#endif\n\n uint32_t\n ioat_transfer_data_cb(int vid, uint16_t queue_id,\n@@ -42,4 +36,28 @@ uint32_t\n ioat_check_completed_copies_cb(int vid, uint16_t queue_id,\n \t\tstruct rte_vhost_async_status *opaque_data,\n \t\tuint16_t max_packets);\n+#else\n+static int open_ioat(const char *value __rte_unused)\n+{\n+\treturn -1;\n+}\n+\n+static uint32_t\n+ioat_transfer_data_cb(int vid __rte_unused, uint16_t queue_id __rte_unused,\n+\t\tstruct rte_vhost_async_desc *descs __rte_unused,\n+\t\tstruct rte_vhost_async_status *opaque_data __rte_unused,\n+\t\tuint16_t count __rte_unused)\n+{\n+\treturn -1;\n+}\n+\n+static uint32_t\n+ioat_check_completed_copies_cb(int vid __rte_unused,\n+\t\tuint16_t queue_id __rte_unused,\n+\t\tstruct rte_vhost_async_status *opaque_data __rte_unused,\n+\t\tuint16_t max_packets __rte_unused)\n+{\n+\treturn -1;\n+}\n+#endif\n #endif /* _IOAT_H_ */\ndiff --git a/examples/vhost/main.c b/examples/vhost/main.c\nindex 59a1aff07..4dc6102ab 100644\n--- a/examples/vhost/main.c\n+++ b/examples/vhost/main.c\n@@ -1294,13 +1294,6 @@ new_device(int vid)\n \tint lcore, core_add = 0;\n \tuint32_t device_num_min = num_devices;\n \tstruct vhost_dev *vdev;\n-\n-\tstruct rte_vhost_async_channel_ops channel_ops = {\n-\t\t.transfer_data = ioat_transfer_data_cb,\n-\t\t.check_completed_copies = ioat_check_completed_copies_cb\n-\t};\n-\tstruct rte_vhost_async_features f;\n-\n \tvdev = rte_zmalloc(\"vhost device\", sizeof(*vdev), RTE_CACHE_LINE_SIZE);\n \tif (vdev == NULL) {\n \t\tRTE_LOG(INFO, VHOST_DATA,\n@@ -1342,10 +1335,17 @@ new_device(int vid)\n \t\tvid, vdev->coreid);\n\n \tif (async_vhost_driver) {\n-\t\tf.async_inorder = 1;\n-\t\tf.async_threshold = 256;\n-\t\treturn rte_vhost_async_channel_register(vid, VIRTIO_RXQ,\n-\t\t\tf.intval, &channel_ops);\n+\t\tstruct rte_vhost_async_features f;\n+\t\tstruct rte_vhost_async_channel_ops channel_ops;\n+\t\tif (strncmp(dma_type, \"ioat\", 4) == 0) {\n+\t\t\tchannel_ops.transfer_data = ioat_transfer_data_cb;\n+\t\t\tchannel_ops.check_completed_copies =\n+\t\t\t\tioat_check_completed_copies_cb;\n+\t\t\tf.async_inorder = 1;\n+\t\t\tf.async_threshold = 256;\n+\t\t\treturn rte_vhost_async_channel_register(vid, VIRTIO_RXQ,\n+\t\t\t\tf.intval, &channel_ops);\n+\t\t}\n \t}\n\n \treturn 0;\ndiff --git a/examples/vhost/meson.build b/examples/vhost/meson.build\nindex 24f1f7131..d5388a795 100644\n--- a/examples/vhost/meson.build\n+++ b/examples/vhost/meson.build\n@@ -15,7 +15,7 @@ sources = files(\n \t'main.c', 'virtio_net.c'\n )\n\n-if dpdk_conf.has('RTE_ARCH_X86')\n+if dpdk_conf.has('RTE_RAW_IOAT')\n \tdeps += 'raw_ioat'\n \tsources += files('ioat.c')\n endif\n",
    "prefixes": [
        "v4"
    ]
}