net/dpaa2: add support for congestion notification
[dpdk.git] / lib / librte_vhost / vhost_user.c
index 604d95d..5c8058b 100644 (file)
@@ -167,6 +167,11 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features)
        if (features & ~vhost_features)
                return -1;
 
+       if ((dev->flags & VIRTIO_DEV_RUNNING) && dev->features != features) {
+               if (dev->notify_ops->features_changed)
+                       dev->notify_ops->features_changed(dev->vid, features);
+       }
+
        dev->features = features;
        if (dev->features &
                ((1 << VIRTIO_NET_F_MRG_RXBUF) | (1ULL << VIRTIO_F_VERSION_1))) {
@@ -499,12 +504,6 @@ vhost_user_set_mem_table(struct virtio_net *dev, struct VhostUserMsg *pmsg)
        uint32_t i;
        int fd;
 
-       /* Remove from the data plane. */
-       if (dev->flags & VIRTIO_DEV_RUNNING) {
-               dev->flags &= ~VIRTIO_DEV_RUNNING;
-               dev->notify_ops->destroy_device(dev->vid);
-       }
-
        if (dev->mem) {
                free_mem_region(dev);
                rte_free(dev->mem);