net/vhost: initialise device as inactive
authorCiara Loftus <ciara.loftus@intel.com>
Thu, 3 May 2018 13:17:03 +0000 (14:17 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:37 +0000 (22:31 +0100)
commitaee6c97f006cea7b1c791b21b222442437ee5403
treedc09b6db0358b999a6da954fd188a1d70f4d2663
parentdc3530ec0d246d538395046c735fbb21b7192380
net/vhost: initialise device as inactive

rte_eth_vhost_get_vid_from_port_id returns a value of 0 if
called before the first call to the new_device callback.
A vid value >=0 suggests the device is active which is not
the case in this instance. Initialise vid to a negative
value to prevent this.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/vhost/rte_eth_vhost.c