DPDK_DEV_VHOST = 1,
};
-static int rte_eal_init_ret = ENODEV;
-
/* Quality of Service */
/* An instance of a QoS configuration. Always associated with a particular
{
struct netdev_dpdk *dev;
- if (!rte_eal_init_ret) { /* Only after successful initialization */
- dev = dpdk_rte_mzalloc(sizeof *dev);
- if (dev) {
- return &dev->up;
- }
+ dev = dpdk_rte_mzalloc(sizeof *dev);
+ if (dev) {
+ return &dev->up;
}
+
return NULL;
}
return EINVAL;
}
- if (rte_eal_init_ret) {
- return rte_eal_init_ret;
- }
-
ovs_mutex_lock(&dpdk_mutex);
/* Take the name of the vhost-user port and append it to the location where
* the socket is to be created, then register the socket.
{
int err;
- if (rte_eal_init_ret) {
- return rte_eal_init_ret;
- }
-
ovs_mutex_lock(&dpdk_mutex);
err = netdev_dpdk_init(netdev, -1, DPDK_DEV_VHOST);
ovs_mutex_unlock(&dpdk_mutex);
unsigned int port_no;
int err;
- if (rte_eal_init_ret) {
- return rte_eal_init_ret;
- }
-
/* Names always start with "dpdk" */
err = dpdk_dev_parse_name(netdev->name, "dpdk", &port_no);
if (err) {
unsigned int port_no = 0;
int err = 0;
- if (rte_eal_init_ret) {
- return rte_eal_init_ret;
- }
-
ovs_mutex_lock(&dpdk_mutex);
err = dpdk_ring_open(netdev->name, &port_no);
atexit(deferred_argv_release);
rte_memzone_dump(stdout);
- rte_eal_init_ret = 0;
/* We are called from the main thread here */
RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;