From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [PATCH 01/12] lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX Date: Fri, 30 Jan 2015 19:03:13 +0900 Message-ID: <54CB56E1.1030402@igel.co.jp> References: <1422599787-12009-1-git-send-email-huawei.xie@intel.com> <1422599787-12009-2-git-send-email-huawei.xie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: Huawei Xie , dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1422599787-12009-2-git-send-email-huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On 2015/01/30 15:36, Huawei Xie wrote: > 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. > > 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-ne= t.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; > =20 > /* 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 =3D VHOST_SUPPORTED_FEATURES; > =20 > /* Line size for reading maps file. */ Hi Xie, Could you please check below code? --------------------- examples/vhost/main.c --------------------- case 'P': promiscuous =3D 1; vmdq_conf_default.rx_adv_conf.vmdq_rx_conf.rx_mod= e =3D ETH_VMDQ_ACCEPT_BROADCAST | ETH_VMDQ_ACCEPT_MULTICAST; rte_vhost_feature_enable(1ULL << VIRTIO_NET_F_CTRL_RX); VIRTIO_NET_F_CTRL_RX is always enabled by this patch. So if 'P' isn't specified in vhost example, does it need to be disabled? Thanks, Tetsuya