X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvhost%2Fmain.c;h=8517fd3924eef6d7a661b8adc66d3b9b90dba8e7;hb=b5967c1fe58911ab4f353094c37b0823984570a0;hp=b2aa7031e19b8a82970973f647193f6cc1e664cc;hpb=28deb0204bfb22ab0ac5bfaea9912cd33cb13bae;p=dpdk.git diff --git a/examples/vhost/main.c b/examples/vhost/main.c index b2aa7031e1..8517fd3924 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -2271,16 +2271,6 @@ init_data_ll (void) return 0; } -/* - * Set virtqueue flags so that we do not receive interrupts. - */ -static void -set_irq_status (struct virtio_net *dev) -{ - dev->virtqueue[VIRTIO_RXQ]->used->flags = VRING_USED_F_NO_NOTIFY; - dev->virtqueue[VIRTIO_TXQ]->used->flags = VRING_USED_F_NO_NOTIFY; -} - /* * Remove a device from the specific data core linked list and from the main linked list. Synchonization * occurs through the use of the lcore dev_removal_flag. Device is made volatile here to avoid re-ordering @@ -2732,7 +2722,8 @@ new_device (struct virtio_net *dev) memset(&dev_statistics[dev->device_fh], 0, sizeof(struct device_statistics)); /* Disable notifications. */ - set_irq_status(dev); + rte_vhost_enable_guest_notification(dev, VIRTIO_RXQ, 0); + rte_vhost_enable_guest_notification(dev, VIRTIO_TXQ, 0); lcore_info[vdev->coreid].lcore_ll->device_num++; dev->flags |= VIRTIO_DEV_RUNNING;