]> git.droids-corp.org - dpdk.git/commitdiff
vhost: add vDPA operations for block device
authorAndy Pei <andy.pei@intel.com>
Tue, 24 May 2022 02:48:06 +0000 (10:48 +0800)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 1 Jun 2022 09:50:09 +0000 (11:50 +0200)
Get_config and set_config are necessary ops for blk device.
Add get_config and set_config ops to vDPA ops.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/vhost/vdpa_driver.h

index 88138be34a9d00e00df2724f39018171bf492eff..c4233a622c2edabfcb21bd7f880ae4e948543740 100644 (file)
@@ -72,8 +72,12 @@ 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);
 };
 
 /**