X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fvirtio%2Fvirtio_user_ethdev.c;h=042665bc0984bae5658ea5f8b25042c19d5409b1;hb=ac61aa646322dc100689e03dbffdc9c5536cc23d;hp=3a51afd7112fb5d65cecf0d1ecbe254dfdd34fcb;hpb=7d62bf6f54ba2d828fbce4f3f3a7a7b449269acf;p=dpdk.git diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 3a51afd711..042665bc09 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -269,7 +269,11 @@ static void virtio_user_set_status(struct virtio_hw *hw, uint8_t status) { struct virtio_user_dev *dev = virtio_user_get_dev(hw); + uint8_t old_status = dev->status; + if (status & VIRTIO_CONFIG_STATUS_FEATURES_OK && + ~old_status & VIRTIO_CONFIG_STATUS_FEATURES_OK) + virtio_user_dev_set_features(dev); if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK) virtio_user_start_device(dev); else if (status == VIRTIO_CONFIG_STATUS_RESET) @@ -877,9 +881,7 @@ virtio_user_pmd_remove(struct rte_vdev_device *vdev) return rte_eth_dev_release_port(eth_dev); /* make sure the device is stopped, queues freed */ - rte_eth_dev_close(eth_dev->data->port_id); - - return 0; + return rte_eth_dev_close(eth_dev->data->port_id); } static int virtio_user_pmd_dma_map(struct rte_vdev_device *vdev, void *addr,