git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
examples/ipsec-secgw: fix session mempool initialisation
[dpdk.git]
/
drivers
/
net
/
virtio
/
virtio_user_ethdev.c
diff --git
a/drivers/net/virtio/virtio_user_ethdev.c
b/drivers/net/virtio/virtio_user_ethdev.c
index
3a51afd
..
042665b
100644
(file)
--- 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);
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)
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 */
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,
}
static int virtio_user_pmd_dma_map(struct rte_vdev_device *vdev, void *addr,