From: Huawei Xie Date: Mon, 23 Feb 2015 17:36:23 +0000 (+0000) Subject: vhost: enable virtio control channel Rx mode X-Git-Tag: spdx-start~9614 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=04d696037af200411f7bb8928c64eb41d5d95e15;p=dpdk.git vhost: enable virtio control channel Rx mode 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 Acked-by: Tetsuya Mukawa --- diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index b041849de4..52b49577c6 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. */