Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/85768/?format=api
http://patches.dpdk.org/api/patches/85768/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201228071610.105028-2-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": "<20201228071610.105028-2-Cheng1.jiang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201228071610.105028-2-Cheng1.jiang@intel.com", "date": "2020-12-28T07:16:09", "name": "[v5,1/2] examples/vhost: add ioat ring space count and check", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "865f6fcac9a0440c8daf8d6fc1730b3979ed9a2b", "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/20201228071610.105028-2-Cheng1.jiang@intel.com/mbox/", "series": [ { "id": 14479, "url": "http://patches.dpdk.org/api/series/14479/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14479", "date": "2020-12-28T07:16:08", "name": "examples/vhost: sample code refactor", "version": 5, "mbox": "http://patches.dpdk.org/series/14479/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/85768/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/85768/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 F189BA09FF;\n\tMon, 28 Dec 2020 08:28:29 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AC65CC9EE;\n\tMon, 28 Dec 2020 08:28:11 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 3CD9CC9C0\n for <dev@dpdk.org>; Mon, 28 Dec 2020 08:28:09 +0100 (CET)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Dec 2020 23:28:08 -0800", "from dpdk_jiangcheng.sh.intel.com ([10.67.119.112])\n by orsmga006.jf.intel.com with ESMTP; 27 Dec 2020 23:28:06 -0800" ], "IronPort-SDR": [ "\n npkLI6S5sOflubOyu6fndWGq7YGdpKd36q8asy+mRA+jqxl/RBzw5N+E57h07l0e1d5r/Dvyap\n qIbiLwENDZjw==", "\n tt3p1jPzcPqoXma+wT2M3M0c4BluM6eyhPrz3vSFNrT4ZDxjIDn7LfigqC+Y92ZIt8Q/weCnOl\n cTTf/QfLS9bA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9847\"; a=\"194832408\"", "E=Sophos;i=\"5.78,454,1599548400\"; d=\"scan'208\";a=\"194832408\"", "E=Sophos;i=\"5.78,454,1599548400\"; d=\"scan'208\";a=\"347502444\"" ], "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": "Mon, 28 Dec 2020 07:16:09 +0000", "Message-Id": "<20201228071610.105028-2-Cheng1.jiang@intel.com>", "X-Mailer": "git-send-email 2.29.2", "In-Reply-To": "<20201228071610.105028-1-Cheng1.jiang@intel.com>", "References": "<20201218113327.70528-1-Cheng1.jiang@intel.com>\n <20201228071610.105028-1-Cheng1.jiang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v5 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. Add rte_ioat_completed_ops() fail handler.\n\nSigned-off-by: Cheng Jiang <Cheng1.jiang@intel.com>\n---\n examples/vhost/ioat.c | 22 ++++++++++++----------\n 1 file changed, 12 insertions(+), 10 deletions(-)", "diff": "diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c\nindex 71d8a1f1f..679d1e2f5 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@@ -178,17 +176,21 @@ ioat_check_completed_copies_cb(int vid, uint16_t queue_id,\n {\n \tif (!opaque_data) {\n \t\tuintptr_t dump[255];\n-\t\tunsigned short n_seg;\n+\t\tint n_seg;\n \t\tunsigned short read, write;\n \t\tunsigned short nb_packet = 0;\n \t\tunsigned short mask = MAX_ENQUEUED_SIZE - 1;\n \t\tunsigned short i;\n+\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\tn_seg += cb_tracker[dev_id].last_remain;\n \t\tif (!n_seg)\n \t\t\treturn 0;\n+\n+\t\tcb_tracker[dev_id].ioat_space += n_seg;\n+\t\tn_seg += cb_tracker[dev_id].last_remain;\n+\n \t\tread = cb_tracker[dev_id].next_read;\n \t\twrite = cb_tracker[dev_id].next_write;\n \t\tfor (i = 0; i < max_packets; i++) {\n", "prefixes": [ "v5", "1/2" ] }{ "id": 85768, "url": "