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
doc: add more supported speeds in ice guide
[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
893f48a
..
3fc1725
100644
(file)
--- a/
drivers/net/virtio/virtio_user_ethdev.c
+++ b/
drivers/net/virtio/virtio_user_ethdev.c
@@
-20,6
+20,7
@@
#include "virtqueue.h"
#include "virtio_rxtx.h"
#include "virtio_user/virtio_user_dev.h"
#include "virtqueue.h"
#include "virtio_rxtx.h"
#include "virtio_user/virtio_user_dev.h"
+#include "virtio_user/vhost.h"
#define virtio_user_get_dev(hw) \
((struct virtio_user_dev *)(hw)->virtio_user_dev)
#define virtio_user_get_dev(hw) \
((struct virtio_user_dev *)(hw)->virtio_user_dev)
@@
-440,8
+441,6
@@
get_integer_arg(const char *key __rte_unused,
return 0;
}
return 0;
}
-static struct rte_vdev_driver virtio_user_driver;
-
static struct rte_eth_dev *
virtio_user_eth_dev_alloc(struct rte_vdev_device *vdev)
{
static struct rte_eth_dev *
virtio_user_eth_dev_alloc(struct rte_vdev_device *vdev)
{
@@
-697,8
+696,6
@@
virtio_user_pmd_remove(struct rte_vdev_device *vdev)
{
const char *name;
struct rte_eth_dev *eth_dev;
{
const char *name;
struct rte_eth_dev *eth_dev;
- struct virtio_hw *hw;
- struct virtio_user_dev *dev;
if (!vdev)
return -EINVAL;
if (!vdev)
return -EINVAL;
@@
-706,8
+703,9
@@
virtio_user_pmd_remove(struct rte_vdev_device *vdev)
name = rte_vdev_device_name(vdev);
PMD_DRV_LOG(INFO, "Un-Initializing %s", name);
eth_dev = rte_eth_dev_allocated(name);
name = rte_vdev_device_name(vdev);
PMD_DRV_LOG(INFO, "Un-Initializing %s", name);
eth_dev = rte_eth_dev_allocated(name);
+ /* Port has already been released by close. */
if (!eth_dev)
if (!eth_dev)
- return
-ENODEV
;
+ return
0
;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return rte_eth_dev_release_port(eth_dev);
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return rte_eth_dev_release_port(eth_dev);
@@
-715,12
+713,6
@@
virtio_user_pmd_remove(struct rte_vdev_device *vdev)
/* make sure the device is stopped, queues freed */
rte_eth_dev_close(eth_dev->data->port_id);
/* make sure the device is stopped, queues freed */
rte_eth_dev_close(eth_dev->data->port_id);
- hw = eth_dev->data->dev_private;
- dev = hw->virtio_user_dev;
- virtio_user_dev_uninit(dev);
-
- rte_eth_dev_release_port(eth_dev);
-
return 0;
}
return 0;
}