[dpdk-dev] [RFC v2 2/2] vhost: support requests only handled by external backend

Maxime Coquelin maxime.coquelin at redhat.com
Thu Feb 28 17:56:55 CET 2019



On 2/28/19 4:31 PM, Maxime Coquelin wrote:
> +	handled = false;
>   	if (dev->extern_ops.pre_msg_handle) {
>   		ret = (*dev->extern_ops.pre_msg_handle)(dev->vid,
> -				(void *)&msg, &skip_master);
> -		if (ret == RTE_VHOST_MSG_RESULT_ERR)
> -			goto skip_to_reply;
> -		else if (ret == RTE_VHOST_MSG_RESULT_REPLY)
> +				(void *)&msg);
> +		switch (ret) {
> +		case RTE_VHOST_MSG_RESULT_REPLY:

Note that I missed to add "/* Fall-through */" so that it builds with
newer GCCs.

That will be fixed in v1.

>   			send_vhost_reply(fd, &msg);
> -
> -		if (skip_master)
> +		case RTE_VHOST_MSG_RESULT_ERR:
> +		case RTE_VHOST_MSG_RESULT_OK:
> +			handled = true;
>   			goto skip_to_post_handle;
> +		case RTE_VHOST_MSG_RESULT_NOT_HANDLED:
> +		default:
> +			break;
> +		}


More information about the dev mailing list