From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 1169] [vhost]VDPA example is aborting when VM starts
Date: Tue, 28 Feb 2023 13:26:20 +0000 [thread overview]
Message-ID: <bug-1169-3@http.bugs.dpdk.org/> (raw)
[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1169
Bug ID: 1169
Summary: [vhost]VDPA example is aborting when VM starts
Product: DPDK
Version: 23.03
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: vhost/virtio
Assignee: dev@dpdk.org
Reporter: ssimma@nvidia.com
Target Milestone: ---
We believe that issue was caused by the following change:
4b02c2673757 ("vhost: annotate async accesses")
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 70d221b9f6..8c1d60b76b 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2168,6 +2168,7 @@ vhost_user_set_vring_enable(struct virtio_net **pdev,
int main_fd __rte_unused)
{
struct virtio_net *dev = *pdev;
+ struct vhost_virtqueue *vq;
bool enable = !!ctx->msg.payload.state.num;
int index = (int)ctx->msg.payload.state.index;
@@ -2175,15 +2176,18 @@ vhost_user_set_vring_enable(struct virtio_net **pdev,
"set queue enable: %d to qp idx: %d\n",
enable, index);
- if (enable && dev->virtqueue[index]->async) {
- if (dev->virtqueue[index]->async->pkts_inflight_n) {
+ vq = dev->virtqueue[index];
+ /* vhost_user_lock_all_queue_pairs locked all qps */
+ vq_assert_lock(dev, vq); # this
assert fired
+ if (enable && vq->async) {
+ if (vq->async->pkts_inflight_n) {
VHOST_LOG_CONFIG(dev->ifname, ERR,
"failed to enable vring. Inflight packets must
be completed first\n");
return RTE_VHOST_MSG_RESULT_ERR;
}
}
- dev->virtqueue[index]->enabled = enable;
+ vq->enabled = enable;
return RTE_VHOST_MSG_RESULT_OK;
}
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 4088 bytes --]
reply other threads:[~2023-02-28 13:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bug-1169-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.