summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorYuanhan Liu <yuanhan.liu@linux.intel.com>2016-04-29 11:59:47 +0800
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2016-06-22 06:10:54 +0200
commit550c9d27d1438c30a657016a0281fe8e7a133e53 (patch)
tree2a156a4fe34797f67c05984f5378aabbb933f3ee /examples
parent092f1c2c77d1818a2534578379bd439699cc2296 (diff)
downloaddpdk-550c9d27d1438c30a657016a0281fe8e7a133e53.zip
dpdk-550c9d27d1438c30a657016a0281fe8e7a133e53.tar.gz
dpdk-550c9d27d1438c30a657016a0281fe8e7a133e53.tar.xz
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>
Diffstat (limited to 'examples')
-rw-r--r--examples/vhost/main.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 671a7eb..1a0fe49 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1180,8 +1180,6 @@ destroy_device (volatile struct virtio_net *dev)
struct vhost_dev *vdev;
int lcore;
- dev->flags &= ~VIRTIO_DEV_RUNNING;
-
vdev = (struct vhost_dev *)dev->priv;
/*set the remove flag. */
vdev->remove = 1;
@@ -1261,7 +1259,6 @@ new_device (struct virtio_net *dev)
/* Disable notifications. */
rte_vhost_enable_guest_notification(dev, VIRTIO_RXQ, 0);
rte_vhost_enable_guest_notification(dev, VIRTIO_TXQ, 0);
- dev->flags |= VIRTIO_DEV_RUNNING;
RTE_LOG(INFO, VHOST_DATA, "(%"PRIu64") Device has been added to data core %d\n", dev->device_fh, vdev->coreid);