vdpa/mlx5: add task ring for multi-thread management
[dpdk.git] / lib / vhost / vdpa_driver.h
index fddbd50..8b88a53 100644 (file)
@@ -5,6 +5,10 @@
 #ifndef _VDPA_DRIVER_H_
 #define _VDPA_DRIVER_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stdbool.h>
 
 #include <rte_compat.h>
@@ -68,8 +72,15 @@ struct rte_vdpa_dev_ops {
        /** Reset statistics of the queue */
        int (*reset_stats)(struct rte_vdpa_device *dev, int qid);
 
-       /** Reserved for future extension */
-       void *reserved[2];
+       /** Get the device configuration space */
+       int (*get_config)(int vid, uint8_t *config, uint32_t size);
+
+       /** Set the device configuration space */
+       int (*set_config)(int vid, uint8_t *config, uint32_t offset,
+                     uint32_t size, uint32_t flags);
+
+       /** get device type: net device, blk device... */
+       int (*get_dev_type)(struct rte_vdpa_device *dev, uint32_t *type);
 };
 
 /**
@@ -144,4 +155,8 @@ __rte_internal
 int
 rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _VDPA_DRIVER_H_ */