VHOST_LOG(INFO, "Vhost device %d created\n", vid);
- _rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+ rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
return 0;
}
VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
eth_vhost_uninstall_intr(eth_dev);
- _rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+ rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
}
static int
VHOST_LOG(INFO, "vring%u is %s\n",
vring, enable ? "enabled" : "disabled");
- _rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
+ rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
return 0;
}
update_queuing_status(dev);
}
-static void
+static int
eth_dev_close(struct rte_eth_dev *dev)
{
struct pmd_internal *internal;
struct internal_list *list;
unsigned int i;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
internal = dev->data->dev_private;
if (!internal)
- return;
+ return 0;
eth_dev_stop(dev);
rte_free(vring_states[dev->data->port_id]);
vring_states[dev->data->port_id] = NULL;
+
+ return 0;
}
static int
.rx_queue_release = eth_queue_release,
.tx_queue_release = eth_queue_release,
.tx_done_cleanup = eth_tx_done_cleanup,
- .rx_queue_count = eth_rx_queue_count,
.link_update = eth_link_update,
.stats_get = eth_stats_get,
.stats_reset = eth_stats_reset,
internal->flags = flags;
internal->disable_flags = disable_flags;
data->dev_link = pmd_link;
- data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE;
+ data->dev_flags = RTE_ETH_DEV_INTR_LSC;
data->promiscuous = 1;
data->all_multicast = 1;
eth_dev->dev_ops = &ops;
+ eth_dev->rx_queue_count = eth_rx_queue_count;
/* finally assign rx and tx ops */
eth_dev->rx_pkt_burst = eth_vhost_rx;
if (eth_dev == NULL)
return 0;
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return rte_eth_dev_release_port(eth_dev);
-
eth_dev_close(eth_dev);
-
rte_eth_dev_release_port(eth_dev);
return 0;