doc: change dpaa2 helper repository path
[dpdk.git] / lib / librte_vhost / vhost_user.c
index 49832d6..ad2e8d3 100644 (file)
@@ -168,8 +168,12 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features)
        uint64_t vhost_features = 0;
 
        rte_vhost_driver_get_features(dev->ifname, &vhost_features);
-       if (features & ~vhost_features)
+       if (features & ~vhost_features) {
+               RTE_LOG(ERR, VHOST_CONFIG,
+                       "(%d) received invalid negotiated features.\n",
+                       dev->vid);
                return -1;
+       }
 
        if ((dev->flags & VIRTIO_DEV_RUNNING) && dev->features != features) {
                if (dev->notify_ops->features_changed)
@@ -242,8 +246,6 @@ numa_realloc(struct virtio_net *dev, int index)
        struct vhost_virtqueue *old_vq, *vq;
        int ret;
 
-       enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
-
        old_dev = dev;
        vq = old_vq = dev->virtqueue[index];
 
@@ -265,7 +267,7 @@ numa_realloc(struct virtio_net *dev, int index)
                if (!vq)
                        return dev;
 
-               memcpy(vq, old_vq, sizeof(*vq) * VIRTIO_QNUM);
+               memcpy(vq, old_vq, sizeof(*vq));
                rte_free(old_vq);
        }