examples/pipeline: fix build
[dpdk.git] / lib / vhost / rte_vhost.h
index 266048f..4683a53 100644 (file)
@@ -118,6 +118,9 @@ extern "C" {
 
 #define RTE_MAX_VHOST_DEVICE   1024
 
+#define RTE_VHOST_VDPA_DEVICE_TYPE_NET 0
+#define RTE_VHOST_VDPA_DEVICE_TYPE_BLK 1
+
 struct rte_vdpa_device;
 
 /**
@@ -512,6 +515,20 @@ rte_vhost_driver_detach_vdpa_device(const char *path);
 struct rte_vdpa_device *
 rte_vhost_driver_get_vdpa_device(const char *path);
 
+/**
+ * Get the device type of the vdpa device.
+ *
+ * @param path
+ *  The vhost-user socket file path
+ * @param type
+ *  the device type of the vdpa device
+ * @return
+ *  0 on success, -1 on failure
+ */
+__rte_experimental
+int
+rte_vhost_driver_get_vdpa_dev_type(const char *path, uint32_t *type);
+
 /**
  * Set the feature bits the vhost-user driver supports.
  *