Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/85715/?format=api
https://patches.dpdk.org/api/patches/85715/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201224084918.10345-2-Cheng1.jiang@intel.com/", "project": { "id": 1, "url": "https://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": "<20201224084918.10345-2-Cheng1.jiang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201224084918.10345-2-Cheng1.jiang@intel.com", "date": "2020-12-24T08:49:17", "name": "[v3,1/2] examples/vhost: add ioat ring space count and check", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "21bfdddd957564e1c1bea47e9fdf26fa6fec351b", "submitter": { "id": 1530, "url": "https://patches.dpdk.org/api/people/1530/?format=api", "name": "Jiang, Cheng1", "email": "Cheng1.jiang@intel.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201224084918.10345-2-Cheng1.jiang@intel.com/mbox/", "series": [ { "id": 14455, "url": "https://patches.dpdk.org/api/series/14455/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14455", "date": "2020-12-24T08:49:16", "name": "examples/vhost: sample code refactor", "version": 3, "mbox": "https://patches.dpdk.org/series/14455/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/85715/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/85715/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 E3BB8A09FF;\n\tThu, 24 Dec 2020 10:01:08 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A8BC6CA14;\n\tThu, 24 Dec 2020 10:00:52 +0100 (CET)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 786ECC9FC\n for <dev@dpdk.org>; Thu, 24 Dec 2020 10:00:48 +0100 (CET)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Dec 2020 01:00:42 -0800", "from dpdk_jiangcheng.sh.intel.com ([10.67.119.112])\n by fmsmga002.fm.intel.com with ESMTP; 24 Dec 2020 01:00:41 -0800" ], "IronPort-SDR": [ "\n V59OgtCv0yXpq0kysVWxkpDoN96SmjH9r7j3q+pJky7hJSAJHI8UHbSFyDCfFOdXA1KeRzJZWA\n g3GYU8O6jkBg==", "\n QMZZz4ky8ZOUO2x7K8XTVxUr7GZunknzSEujIrzycOJ6y1rak1HgQ8AxTQrsit6ku8gbcGnCjw\n bm5oVW9sCyWw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9844\"; a=\"163185745\"", "E=Sophos;i=\"5.78,444,1599548400\"; d=\"scan'208\";a=\"163185745\"", "E=Sophos;i=\"5.78,444,1599548400\"; d=\"scan'208\";a=\"393756374\"" ], "X-ExtLoop1": "1", "From": "Cheng Jiang <Cheng1.jiang@intel.com>", "To": "maxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com", "Cc": "dev@dpdk.org, Jiayu.Hu@intel.com, YvonneX.Yang@intel.com,\n Cheng Jiang <Cheng1.jiang@intel.com>", "Date": "Thu, 24 Dec 2020 08:49:17 +0000", "Message-Id": "<20201224084918.10345-2-Cheng1.jiang@intel.com>", "X-Mailer": "git-send-email 2.29.2", "In-Reply-To": "<20201224084918.10345-1-Cheng1.jiang@intel.com>", "References": "<20201218113327.70528-1-Cheng1.jiang@intel.com>\n <20201224084918.10345-1-Cheng1.jiang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 1/2] examples/vhost: add ioat ring space count\n\tand check", "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": "Add ioat ring space count and check, if ioat ring space is not enough\nfor the next async vhost packet enqueue, then just return to prevent\nenqueue failure.\n\nSigned-off-by: Cheng Jiang <Cheng1.jiang@intel.com>\n---\n examples/vhost/ioat.c | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)", "diff": "diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c\nindex 71d8a1f1f..b0b04aa45 100644\n--- a/examples/vhost/ioat.c\n+++ b/examples/vhost/ioat.c\n@@ -17,6 +17,7 @@ struct packet_tracker {\n \tunsigned short next_read;\n \tunsigned short next_write;\n \tunsigned short last_remain;\n+\tunsigned short ioat_space;\n };\n \n struct packet_tracker cb_tracker[MAX_VHOST_DEVICE];\n@@ -113,7 +114,7 @@ open_ioat(const char *value)\n \t\t\tgoto out;\n \t\t}\n \t\trte_rawdev_start(dev_id);\n-\n+\t\tcb_tracker[dev_id].ioat_space = IOAT_RING_SIZE;\n \t\tdma_info->nr++;\n \t\ti++;\n \t}\n@@ -140,13 +141,9 @@ ioat_transfer_data_cb(int vid, uint16_t queue_id,\n \t\t\tsrc = descs[i_desc].src;\n \t\t\tdst = descs[i_desc].dst;\n \t\t\ti_seg = 0;\n+\t\t\tif (cb_tracker[dev_id].ioat_space < src->nr_segs)\n+\t\t\t\tbreak;\n \t\t\twhile (i_seg < src->nr_segs) {\n-\t\t\t\t/*\n-\t\t\t\t * TODO: Assuming that the ring space of the\n-\t\t\t\t * IOAT device is large enough, so there is no\n-\t\t\t\t * error here, and the actual error handling\n-\t\t\t\t * will be added later.\n-\t\t\t\t */\n \t\t\t\trte_ioat_enqueue_copy(dev_id,\n \t\t\t\t\t(uintptr_t)(src->iov[i_seg].iov_base)\n \t\t\t\t\t\t+ src->offset,\n@@ -158,7 +155,8 @@ ioat_transfer_data_cb(int vid, uint16_t queue_id,\n \t\t\t\ti_seg++;\n \t\t\t}\n \t\t\twrite &= mask;\n-\t\t\tcb_tracker[dev_id].size_track[write] = i_seg;\n+\t\t\tcb_tracker[dev_id].size_track[write] = src->nr_segs;\n+\t\t\tcb_tracker[dev_id].ioat_space -= src->nr_segs;\n \t\t\twrite++;\n \t\t}\n \t} else {\n@@ -186,6 +184,7 @@ ioat_check_completed_copies_cb(int vid, uint16_t queue_id,\n \t\tint dev_id = dma_bind[vid].dmas[queue_id * 2\n \t\t\t\t+ VIRTIO_RXQ].dev_id;\n \t\tn_seg = rte_ioat_completed_ops(dev_id, 255, dump, dump);\n+\t\tcb_tracker[dev_id].ioat_space += n_seg;\n \t\tn_seg += cb_tracker[dev_id].last_remain;\n \t\tif (!n_seg)\n \t\t\treturn 0;\n", "prefixes": [ "v3", "1/2" ] }{ "id": 85715, "url": "