Skip to contentSkip to conversation

VDPA example is aborting when VM starts

Bug 1169 [email protected] 1 participant 1 message Feb 28, 2023

lore
Share & tools
lore
#0 lore raw

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: [email protected]
          Reporter: [email protected]

Target Milestone: ---

We believe that issue was caused by the following change:
4b02c2673757 ("vhost: annotate async accesses")

lib/vhost/vhost_user.c +0 -0
index 70d221b9f6..8c1d60b76b 100644
@@ -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;
}
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.