From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
by inbox.dpdk.org (Postfix) with ESMTP id 16C3941D9D;
Tue, 28 Feb 2023 14:26:21 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
by mails.dpdk.org (Postfix) with ESMTP id 09629410D4;
Tue, 28 Feb 2023 14:26:21 +0100 (CET)
Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178])
by mails.dpdk.org (Postfix) with ESMTP id 0E88E4021F
for ; Tue, 28 Feb 2023 14:26:20 +0100 (CET)
Received: by inbox.dpdk.org (Postfix, from userid 33)
id 0787541D9E; Tue, 28 Feb 2023 14:26:20 +0100 (CET)
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
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: vhost/virtio
X-Bugzilla-Version: 23.03
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ssimma@nvidia.com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: Normal
X-Bugzilla-Assigned-To: dev@dpdk.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
op_sys bug_status bug_severity priority component assigned_to reporter
target_milestone
Message-ID:
Content-Type: multipart/alternative; boundary=16775907790.fEf9.1311593
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
MIME-Version: 1.0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dev-bounces@dpdk.org
--16775907790.fEf9.1311593
Date: Tue, 28 Feb 2023 14:26:19 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
https://bugs.dpdk.org/show_bug.cgi?id=3D1169
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")=20
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 =3D *pdev;
+ struct vhost_virtqueue *vq;
bool enable =3D !!ctx->msg.payload.state.num;
int index =3D (int)ctx->msg.payload.state.index;
@@ -2175,15 +2176,18 @@ vhost_user_set_vring_enable(struct virtio_net **pde=
v,
"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 =3D dev->virtqueue[index];
+ /* vhost_user_lock_all_queue_pairs locked all qps */
+ vq_assert_lock(dev, vq); # th=
is
assert fired
+ if (enable && vq->async) {
+ if (vq->async->pkts_inflight_n) {
VHOST_LOG_CONFIG(dev->ifname, ERR,
"failed to enable vring. Inflight packets m=
ust
be completed first\n");
return RTE_VHOST_MSG_RESULT_ERR;
}
}
- dev->virtqueue[index]->enabled =3D enable;
+ vq->enabled =3D enable;
return RTE_VHOST_MSG_RESULT_OK;
}
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--16775907790.fEf9.1311593
Date: Tue, 28 Feb 2023 14:26:19 +0100
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
| 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 |
---
|
You are receiving this mail because:
- You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
=
--16775907790.fEf9.1311593--
We believe that issue was caused b= y the following change: 4b02c2673757 ("vhost: annotate async accesses")=20 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 vi= rtio_net **pdev, int main_fd __rte_unused) { struct virtio_net *dev =3D *pdev; + struct vhost_virtqueue *vq; bool enable =3D !!ctx->msg.payload.state.num; int index =3D (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 =3D dev->virtqueue[index]; + /* vhost_user_lock_all_queue_pairs locked all qps */ + vq_assert_lock(dev, vq); # th= is assert fired + if (enable && vq->async) { + if (vq->async->pkts_inflight_n) { VHOST_LOG_CONFIG(dev->ifname, ERR, "failed to enable vring. Inflight pack= ets must be completed first\n"); return RTE_VHOST_MSG_RESULT_ERR; } } - dev->virtqueue[index]->enabled =3D enable; + vq->enabled =3D enable; return RTE_VHOST_MSG_RESULT_OK; }