From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [RFC v2 2/2] vhost: support requests only handled by external backend Date: Thu, 28 Feb 2019 17:56:55 +0100 Message-ID: References: <20190228153134.31865-1-maxime.coquelin@redhat.com> <20190228153134.31865-3-maxime.coquelin@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: dev@dpdk.org, changpeng.liu@intel.com, tiwei.bie@intel.com, i.maximets@samsung.com Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 53C5C326D for ; Thu, 28 Feb 2019 17:56:59 +0100 (CET) In-Reply-To: <20190228153134.31865-3-maxime.coquelin@redhat.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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; > + }