From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) by dpdk.org (Postfix) with ESMTP id 924D6255 for ; Fri, 30 Jan 2015 12:59:15 +0100 (CET) Received: from 172.24.2.119 (EHLO szxeml425-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CGP21214; Fri, 30 Jan 2015 19:59:11 +0800 (CST) Received: from [127.0.0.1] (10.177.19.115) by szxeml425-hub.china.huawei.com (10.82.67.180) with Microsoft SMTP Server id 14.3.158.1; Fri, 30 Jan 2015 19:59:06 +0800 Message-ID: <54CB7208.6040903@huawei.com> Date: Fri, 30 Jan 2015 19:59:04 +0800 From: Linhaifeng User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Huawei Xie , References: <1422242440-28948-1-git-send-email-huawei.xie@intel.com> <1422242440-28948-2-git-send-email-huawei.xie@intel.com> In-Reply-To: <1422242440-28948-2-git-send-email-huawei.xie@intel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.115] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [RFC PATCH v2 01/14] enable VIRTIO_NET_F_CTRL_RX VIRTIO_NET_F_CTRL_RX is dependant on VIRTIO_NET_F_CTRL_VQ. Observed that virtio-net driver in guest would crash with only CTRL_RX enabled. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 11:59:17 -0000 On 2015/1/26 11:20, Huawei Xie wrote: > In virtnet_send_command: > > /* Caller should know better */ > BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) || > (out + in > VIRTNET_SEND_COMMAND_SG_MAX)); > > Signed-off-by: Huawei Xie > --- > lib/librte_vhost/virtio-net.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c > index b041849..52b4957 100644 > --- a/lib/librte_vhost/virtio-net.c > +++ b/lib/librte_vhost/virtio-net.c > @@ -73,7 +73,8 @@ static struct virtio_net_config_ll *ll_root; > > /* Features supported by this lib. */ > #define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ > - (1ULL << VIRTIO_NET_F_CTRL_RX)) > + (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ > + (1ULL << VIRTIO_NET_F_CTRL_RX)) > static uint64_t VHOST_FEATURES = VHOST_SUPPORTED_FEATURES; > > /* Line size for reading maps file. */ > Hi,Xie If don't have features VIRTIO_NET_F_CTRL_VQ and VIRTIO_NET_F_CTRL_RX what would happen? Why add the two features? -- Regards, Haifeng