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
ethdev: get rid of device type
[dpdk.git]
/
drivers
/
net
/
vhost
/
rte_eth_vhost.c
diff --git
a/drivers/net/vhost/rte_eth_vhost.c
b/drivers/net/vhost/rte_eth_vhost.c
index
596faea
..
d0bffbd
100644
(file)
--- a/
drivers/net/vhost/rte_eth_vhost.c
+++ b/
drivers/net/vhost/rte_eth_vhost.c
@@
-303,6
+303,7
@@
destroy_device(int vid)
struct internal_list *list;
char ifname[PATH_MAX];
unsigned i;
struct internal_list *list;
char ifname[PATH_MAX];
unsigned i;
+ struct rte_vhost_vring_state *state;
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
@@
-345,6
+346,15
@@
destroy_device(int vid)
vq->vid = -1;
}
vq->vid = -1;
}
+ state = vring_states[eth_dev->data->port_id];
+ rte_spinlock_lock(&state->lock);
+ for (i = 0; i <= state->max_vring; i++) {
+ state->cur[i] = false;
+ state->seen[i] = false;
+ }
+ state->max_vring = 0;
+ rte_spinlock_unlock(&state->lock);
+
RTE_LOG(INFO, PMD, "Connection closed\n");
_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC);
RTE_LOG(INFO, PMD, "Connection closed\n");
_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC);
@@
-704,7
+714,7
@@
eth_dev_vhost_create(const char *name, char *iface_name, int16_t queues,
goto error;
/* reserve an ethdev entry */
goto error;
/* reserve an ethdev entry */
- eth_dev = rte_eth_dev_allocate(name
, RTE_ETH_DEV_VIRTUAL
);
+ eth_dev = rte_eth_dev_allocate(name);
if (eth_dev == NULL)
goto error;
if (eth_dev == NULL)
goto error;
@@
-920,7
+930,7
@@
static struct rte_driver pmd_vhost_drv = {
.uninit = rte_pmd_vhost_devuninit,
};
.uninit = rte_pmd_vhost_devuninit,
};
-PMD_REGISTER_DRIVER(pmd_vhost_drv,
eth
_vhost);
-DRIVER_REGISTER_PARAM_STRING(
eth
_vhost,
+PMD_REGISTER_DRIVER(pmd_vhost_drv,
net
_vhost);
+DRIVER_REGISTER_PARAM_STRING(
net
_vhost,
"iface=<ifc> "
"queues=<int>");
"iface=<ifc> "
"queues=<int>");