Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/84040/?format=api
http://patches.dpdk.org/api/patches/84040/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201112051630.983-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": "<20201112051630.983-1-Cheng1.jiang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201112051630.983-1-Cheng1.jiang@intel.com", "date": "2020-11-12T05:16:30", "name": "[v2] examples/vhost: fix ioat dependency issue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "60684eefc8245abf6f5a648ff8c02b813b5e0c8b", "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/20201112051630.983-1-Cheng1.jiang@intel.com/mbox/", "series": [ { "id": 13826, "url": "http://patches.dpdk.org/api/series/13826/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13826", "date": "2020-11-12T05:16:30", "name": "[v2] examples/vhost: fix ioat dependency issue", "version": 2, "mbox": "http://patches.dpdk.org/series/13826/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/84040/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/84040/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 73019A09D3;\n\tThu, 12 Nov 2020 06:25:27 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4CDE0592C;\n\tThu, 12 Nov 2020 06:25:25 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id 71B125928\n for <dev@dpdk.org>; Thu, 12 Nov 2020 06:25:22 +0100 (CET)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Nov 2020 21:25:20 -0800", "from dpdk_jiangcheng.sh.intel.com ([10.67.119.112])\n by fmsmga004.fm.intel.com with ESMTP; 11 Nov 2020 21:25:17 -0800" ], "IronPort-SDR": [ "\n Gn5xk3zAo5iJ6Qt9dl8x+dSKrQx6l1Kl8w5DZaVqqru9Z8sDy8mphvZ6Qg1rHyc0kQ8j+P3iGO\n reonQ4FUMfWQ==", "\n RVwvelVSSYILo/x4r9hvFVK8BuF/KJuAT5o56SwRA6bHz7tsCr82owi57w6/c7tyf6a3LTJzzH\n Wl7DKjCRW6Dg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9802\"; a=\"170368346\"", "E=Sophos;i=\"5.77,471,1596524400\"; d=\"scan'208\";a=\"170368346\"", "E=Sophos;i=\"5.77,471,1596524400\"; d=\"scan'208\";a=\"356973390\"" ], "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, Jiayu.Hu@intel.com,\n Cheng Jiang <Cheng1.jiang@intel.com>", "Date": "Thu, 12 Nov 2020 05:16:30 +0000", "Message-Id": "<20201112051630.983-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 v2] 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\nand update Makefile. Clean some codes.\n\nSigned-off-by: Cheng Jiang <Cheng1.jiang@intel.com>\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 | 5 +++++\n examples/vhost/ioat.h | 32 +++++++++++++++++++++++++-------\n examples/vhost/main.c | 22 +++++++++++-----------\n examples/vhost/meson.build | 2 +-\n 4 files changed, 42 insertions(+), 19 deletions(-)\n\n--\n2.29.2", "diff": "diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile\nindex cec59d0e0..cbe56f742 100644\n--- a/examples/vhost/Makefile\n+++ b/examples/vhost/Makefile\n@@ -28,6 +28,11 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)\n LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)\n LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)\n\n+HAS_RAW_IOAT=$(shell echo RTE_RAW_IOAT | $(CPP) $(CFLAGS) -P - | tail -1)\n+ifeq ($(HAS_RAW_IOAT), 1)\n+SRCS-y += ioat.c\n+endif\n+\n CFLAGS += -DALLOW_EXPERIMENTAL_API\n\n build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build\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": [ "v2" ] }{ "id": 84040, "url": "