vhost: enable guest notification only on enabled queues
authorRich Lane <rich.lane@bigswitch.com>
Thu, 7 Apr 2016 00:29:06 +0000 (17:29 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 7 Apr 2016 17:24:17 +0000 (19:24 +0200)
commit6fe9e03c380dae686b1610e5fd6ae8921d0bca78
tree82efb9fce102ff81ce6e9ab023f8213b6ca6d369
parentd6cf31419e5109a060dc704f92ca32fe7a351be9
vhost: enable guest notification only on enabled queues

If the vhost PMD were configured with more queues than the guest, the old
code would segfault in rte_vhost_enable_guest_notification due to a NULL
virtqueue pointer.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")

Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/vhost/rte_eth_vhost.c