[RFC 24/27] vhost: add support for VDUSE status set event

Xia, Chenbo chenbo.xia at intel.com
Tue May 9 07:34:28 CEST 2023


> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Friday, March 31, 2023 11:43 PM
> To: dev at dpdk.org; david.marchand at redhat.com; Xia, Chenbo
> <chenbo.xia at intel.com>; mkp at redhat.com; fbl at redhat.com;
> jasowang at redhat.com; Liang, Cunming <cunming.liang at intel.com>; Xie, Yongji
> <xieyongji at bytedance.com>; echaudro at redhat.com; eperezma at redhat.com;
> amorenoz at redhat.com
> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>
> Subject: [RFC 24/27] vhost: add support for VDUSE status set event
> 
> This patch adds support for VDUSE_SET_STATUS event
> handling, which consists in updating the Virtio device
> status set by the Virtio driver.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
>  lib/vhost/vduse.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
> index 36028b7315..7d59a5f709 100644
> --- a/lib/vhost/vduse.c
> +++ b/lib/vhost/vduse.c
> @@ -163,6 +163,12 @@ vduse_events_handler(int fd, void *arg, int *remove
> __rte_unused)
>  		resp.vq_state.split.avail_index = vq->last_avail_idx;
>  		resp.result = VDUSE_REQ_RESULT_OK;
>  		break;
> +	case VDUSE_SET_STATUS:
> +		VHOST_LOG_CONFIG(dev->ifname, INFO, "\tnew status: 0x%08x\n",
> +				req.s.status);
> +		dev->status = req.s.status;
> +		resp.result = VDUSE_REQ_RESULT_OK;
> +		break;
>  	default:
>  		resp.result = VDUSE_REQ_RESULT_FAILED;
>  		break;
> --
> 2.39.2

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


More information about the dev mailing list