From: Xiao Wang <xiao.w.wang@intel.com>
To: maxime.coquelin@redhat.com
Cc: dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com,
zhe.wan@intel.com, Xiao Wang <xiao.w.wang@intel.com>
Subject: [dpdk-dev] [PATCH 2/3] net/ifc: fix mediated vring initialization
Date: Mon, 15 Apr 2019 15:56:24 +0800 [thread overview]
Message-ID: <20190415075625.109948-3-xiao.w.wang@intel.com> (raw)
Message-ID: <20190415075624.Qql66-nGfMGV407S2m-D4gifQVY_L9yT-IPsE5PUiRA@z> (raw)
In-Reply-To: <20190415075625.109948-1-xiao.w.wang@intel.com>
The mediated vring's index should be set as initial value before enabling
HW datapath.
Fixes: 4bb531e152d3 ("net/ifc: support SW assisted VDPA live migration")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
drivers/net/ifc/ifcvf_vdpa.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c
index 619cdc245..9e729ff72 100644
--- a/drivers/net/ifc/ifcvf_vdpa.c
+++ b/drivers/net/ifc/ifcvf_vdpa.c
@@ -631,6 +631,10 @@ m_ifcvf_start(struct ifcvf_internal *internal)
hw->vring[i].size = vq.size;
+ rte_vhost_get_vring_base(vid, i,
+ &internal->m_vring[i].avail->idx,
+ &internal->m_vring[i].used->idx);
+
rte_vhost_get_vring_base(vid, i, &hw->vring[i].last_avail_idx,
&hw->vring[i].last_used_idx);
@@ -702,11 +706,6 @@ vring_relay(void *arg)
vid = internal->vid;
q_num = rte_vhost_get_vring_num(vid);
- /* prepare the mediated vring */
- for (qid = 0; qid < q_num; qid++)
- rte_vhost_get_vring_base(vid, qid,
- &internal->m_vring[qid].avail->idx,
- &internal->m_vring[qid].used->idx);
/* add notify fd and interrupt fd to epoll */
epfd = epoll_create(IFCVF_MAX_QUEUES * 2);
--
2.15.1
next prev parent reply other threads:[~2019-04-15 8:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 7:56 [dpdk-dev] [PATCH 0/3] net/ifc: SW relay improvement and fix Xiao Wang
2019-04-15 7:56 ` Xiao Wang
2019-04-15 7:56 ` [dpdk-dev] [PATCH 1/3] net/ifc: do not relay for Tx queue Xiao Wang
2019-04-15 7:56 ` Xiao Wang
2019-04-15 7:56 ` Xiao Wang [this message]
2019-04-15 7:56 ` [dpdk-dev] [PATCH 2/3] net/ifc: fix mediated vring initialization Xiao Wang
2019-04-15 7:56 ` [dpdk-dev] [PATCH 3/3] net/ifc: fix used ring update Xiao Wang
2019-04-15 7:56 ` Xiao Wang
2019-04-16 17:00 ` [dpdk-dev] [PATCH 0/3] net/ifc: SW relay improvement and fix Ferruh Yigit
2019-04-16 17:00 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190415075625.109948-3-xiao.w.wang@intel.com \
--to=xiao.w.wang@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=tiwei.bie@intel.com \
--cc=zhe.wan@intel.com \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).