vhost-user: support protocol features
[dpdk.git] / lib / librte_vhost / vhost_user / virtio-net-user.c
index e0bc2a4..6da729d 100644 (file)
@@ -318,3 +318,16 @@ user_destroy_device(struct vhost_device_ctx ctx)
                dev->mem = NULL;
        }
 }
+
+void
+user_set_protocol_features(struct vhost_device_ctx ctx,
+                          uint64_t protocol_features)
+{
+       struct virtio_net *dev;
+
+       dev = get_device(ctx);
+       if (dev == NULL || protocol_features & ~VHOST_USER_PROTOCOL_FEATURES)
+               return;
+
+       dev->protocol_features = protocol_features;
+}