[PATCH v9 02/13] vhost: add vDPA ops for blk device

Xia, Chenbo chenbo.xia at intel.com
Tue May 24 04:38:37 CEST 2022


> -----Original Message-----
> From: Pei, Andy <andy.pei at intel.com>
> Sent: Monday, May 23, 2022 5:35 PM
> To: dev at dpdk.org
> Cc: Xia, Chenbo <chenbo.xia at intel.com>; maxime.coquelin at redhat.com; Cao,
> Gang <gang.cao at intel.com>; Liu, Changpeng <changpeng.liu at intel.com>; Xu,
> Rosen <rosen.xu at intel.com>; Xiao, QimaiX <qimaix.xiao at intel.com>
> Subject: [PATCH v9 02/13] vhost: add vDPA ops for blk device
> 
> 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 at intel.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
>  lib/vhost/vdpa_driver.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/vhost/vdpa_driver.h b/lib/vhost/vdpa_driver.h
> index 88138be..c4233a6 100644
> --- a/lib/vhost/vdpa_driver.h
> +++ b/lib/vhost/vdpa_driver.h
> @@ -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);
>  };
> 
>  /**
> --
> 1.8.3.1

Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>


More information about the dev mailing list