vhost: add a flag to enable dequeue zero copy
[dpdk.git] / lib / librte_vhost / rte_virtio_net.h
index bc2b74b..c53ff64 100644 (file)
 #include <rte_mempool.h>
 #include <rte_ether.h>
 
+#define RTE_VHOST_USER_CLIENT          (1ULL << 0)
+#define RTE_VHOST_USER_NO_RECONNECT    (1ULL << 1)
+#define RTE_VHOST_USER_DEQUEUE_ZERO_COPY       (1ULL << 2)
+
 /* Enum for virtqueue management. */
 enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
 
 /**
  * Device and vring operations.
- *
- * Make sure to set VIRTIO_DEV_RUNNING to the device flags in new_device and
- * remove it in destroy_device.
- *
  */
 struct virtio_net_device_ops {
        int (*new_device)(int vid);             /**< Add device. */
@@ -85,11 +85,14 @@ uint64_t rte_vhost_feature_get(void);
 
 int rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable);
 
-/* Register vhost driver. dev_name could be different for multiple instance support. */
-int rte_vhost_driver_register(const char *dev_name);
+/**
+ * Register vhost driver. path could be different for multiple
+ * instance support.
+ */
+int rte_vhost_driver_register(const char *path, uint64_t flags);
 
 /* Unregister vhost driver. This is only meaningful to vhost user. */
-int rte_vhost_driver_unregister(const char *dev_name);
+int rte_vhost_driver_unregister(const char *path);
 
 /* Register callbacks. */
 int rte_vhost_driver_callback_register(struct virtio_net_device_ops const * const);