Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/48724/?format=api
http://patches.dpdk.org/api/patches/48724/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20181213011014.110089-8-xiao.w.wang@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": "<20181213011014.110089-8-xiao.w.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20181213011014.110089-8-xiao.w.wang@intel.com", "date": "2018-12-13T01:10:12", "name": "[v2,7/9] net/ifc: use lib API for used ring logging", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "246752a1d2cb68373b880915fb0d571115758125", "submitter": { "id": 281, "url": "http://patches.dpdk.org/api/people/281/?format=api", "name": "Xiao Wang", "email": "xiao.w.wang@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/20181213011014.110089-8-xiao.w.wang@intel.com/mbox/", "series": [ { "id": 2747, "url": "http://patches.dpdk.org/api/series/2747/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2747", "date": "2018-12-13T01:10:05", "name": "support SW assisted VDPA live migration", "version": 2, "mbox": "http://patches.dpdk.org/series/2747/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/48724/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/48724/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 423BC1B45D;\n\tThu, 13 Dec 2018 02:23:25 +0100 (CET)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 7BEFB1B451\n\tfor <dev@dpdk.org>; Thu, 13 Dec 2018 02:23:24 +0100 (CET)", "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Dec 2018 17:23:23 -0800", "from dpdk-xiao-1.sh.intel.com ([10.67.111.145])\n\tby orsmga008.jf.intel.com with ESMTP; 12 Dec 2018 17:23:21 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,346,1539673200\"; d=\"scan'208\";a=\"101112912\"", "From": "Xiao Wang <xiao.w.wang@intel.com>", "To": "alejandro.lucero@netronome.com,\n\ttiwei.bie@intel.com", "Cc": "maxime.coquelin@redhat.com, dev@dpdk.org, zhihong.wang@intel.com,\n\txiaolong.ye@intel.com, Xiao Wang <xiao.w.wang@intel.com>", "Date": "Thu, 13 Dec 2018 09:10:12 +0800", "Message-Id": "<20181213011014.110089-8-xiao.w.wang@intel.com>", "X-Mailer": "git-send-email 2.15.1", "In-Reply-To": "<20181213011014.110089-1-xiao.w.wang@intel.com>", "References": "<20181128094607.106173-3-xiao.w.wang@intel.com>\n\t<20181213011014.110089-1-xiao.w.wang@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 7/9] net/ifc: use lib API for used ring logging", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Vhost lib has already provided a helper for used ring logging, driver\ncould use it to reduce code.\n\nSigned-off-by: Xiao Wang <xiao.w.wang@intel.com>\n---\n drivers/net/ifc/ifcvf_vdpa.c | 27 ++++++++-------------------\n 1 file changed, 8 insertions(+), 19 deletions(-)", "diff": "diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c\nindex 395c5112f..f181c5a6e 100644\n--- a/drivers/net/ifc/ifcvf_vdpa.c\n+++ b/drivers/net/ifc/ifcvf_vdpa.c\n@@ -31,6 +31,9 @@\n #define PAGE_SIZE 4096\n #endif\n \n+#define IFCVF_USED_RING_LEN(size) \\\n+\t((size) * sizeof(struct vring_used_elem) + sizeof(uint16_t) * 3)\n+\n #define IFCVF_VDPA_MODE\t\t\"vdpa\"\n #define IFCVF_SW_FALLBACK_LM\t\"swlm\"\n \n@@ -288,21 +291,6 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal)\n \treturn ifcvf_start_hw(&internal->hw);\n }\n \n-static void\n-ifcvf_used_ring_log(struct ifcvf_hw *hw, uint32_t queue, uint8_t *log_buf)\n-{\n-\tuint32_t i, size;\n-\tuint64_t pfn;\n-\n-\tpfn = hw->vring[queue].used / PAGE_SIZE;\n-\tsize = hw->vring[queue].size * sizeof(struct vring_used_elem) +\n-\t\t\tsizeof(uint16_t) * 3;\n-\n-\tfor (i = 0; i <= size / PAGE_SIZE; i++)\n-\t\t__sync_fetch_and_or_8(&log_buf[(pfn + i) / 8],\n-\t\t\t\t1 << ((pfn + i) % 8));\n-}\n-\n static void\n vdpa_ifcvf_stop(struct ifcvf_internal *internal)\n {\n@@ -311,7 +299,7 @@ vdpa_ifcvf_stop(struct ifcvf_internal *internal)\n \tint vid;\n \tuint64_t features;\n \tuint64_t log_base, log_size;\n-\tuint8_t *log_buf;\n+\tuint64_t len;\n \n \tvid = internal->vid;\n \tifcvf_stop_hw(hw);\n@@ -330,9 +318,10 @@ vdpa_ifcvf_stop(struct ifcvf_internal *internal)\n \t\t * IFCVF marks dirty memory pages for only packet buffer,\n \t\t * SW helps to mark the used ring as dirty after device stops.\n \t\t */\n-\t\tlog_buf = (uint8_t *)(uintptr_t)log_base;\n-\t\tfor (i = 0; i < hw->nr_vring; i++)\n-\t\t\tifcvf_used_ring_log(hw, i, log_buf);\n+\t\tfor (i = 0; i < hw->nr_vring; i++) {\n+\t\t\tlen = IFCVF_USED_RING_LEN(hw->vring[i].size);\n+\t\t\trte_vhost_log_used_vring(vid, i, 0, len);\n+\t\t}\n \t}\n }\n \n", "prefixes": [ "v2", "7/9" ] }{ "id": 48724, "url": "