vhost: set/reset device flags internally
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 29 Apr 2016 03:59:47 +0000 (11:59 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 22 Jun 2016 04:10:54 +0000 (06:10 +0200)
commit550c9d27d1438c30a657016a0281fe8e7a133e53
tree2a156a4fe34797f67c05984f5378aabbb933f3ee
parent092f1c2c77d1818a2534578379bd439699cc2296
vhost: set/reset device flags internally

It does not make sense to ask the application to set/unset the flag
VIRTIO_DEV_RUNNING (that used internal only) at new_device()/
destroy_device() callback.

Instead, it should be set after new_device() succeeds and reset before
destroy_device() is invoked inside vhost lib. This patch fixes it.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Rich Lane <rich.lane@bigswitch.com>
Acked-by: Rich Lane <rich.lane@bigswitch.com>
drivers/net/vhost/rte_eth_vhost.c
examples/vhost/main.c
lib/librte_vhost/vhost_user/virtio-net-user.c
lib/librte_vhost/virtio-net.c