vhost: enable virtio control channel Rx mode
authorHuawei Xie <huawei.xie@intel.com>
Mon, 23 Feb 2015 17:36:23 +0000 (17:36 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Feb 2015 00:38:07 +0000 (01:38 +0100)
commit04d696037af200411f7bb8928c64eb41d5d95e15
tree5ed2763308f4ab9184c22b067287aa7e5a68c623
parente7bc40da738c24a0cf23517f9d7144c0c96a75de
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 <huawei.xie@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
lib/librte_vhost/virtio-net.c