All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1169] [vhost]VDPA example is aborting when VM starts
@ 2023-02-28 13:26 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2023-02-28 13:26 UTC (permalink / raw)
  To: dev

[-- 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 --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-28 13:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28 13:26 [Bug 1169] [vhost]VDPA example is aborting when VM starts bugzilla

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.