if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring1,k1=val,k2=val2") < 0)
goto fail;
devargs = TAILQ_FIRST(&devargs_list);
- if (strncmp(devargs->virtual.drv_name, "eth_ring1",
- sizeof(devargs->virtual.drv_name)) != 0)
+ if (strncmp(devargs->virt.drv_name, "eth_ring1",
+ sizeof(devargs->virt.drv_name)) != 0)
goto fail;
if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0)
goto fail;
* The deprecated ring PMD functions are removed:
rte_eth_ring_pair_create() and rte_eth_ring_pair_attach().
+* The devargs union field virtual is renamed to virt for C++ compatibility.
+
ABI Changes
-----------
if (devargs->type != RTE_DEVTYPE_VIRTUAL)
continue;
- if (rte_eal_vdev_init(devargs->virtual.drv_name,
+ if (rte_eal_vdev_init(devargs->virt.drv_name,
devargs->args)) {
RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
- devargs->virtual.drv_name);
+ devargs->virt.drv_name);
return -1;
}
}
break;
case RTE_DEVTYPE_VIRTUAL:
/* save driver name */
- ret = snprintf(devargs->virtual.drv_name,
- sizeof(devargs->virtual.drv_name), "%s", buf);
- if (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name))
+ ret = snprintf(devargs->virt.drv_name,
+ sizeof(devargs->virt.drv_name), "%s", buf);
+ if (ret < 0 || ret >= (int)sizeof(devargs->virt.drv_name))
goto fail;
break;
devargs->args);
else if (devargs->type == RTE_DEVTYPE_VIRTUAL)
fprintf(f, " VIRTUAL %s %s\n",
- devargs->virtual.drv_name,
+ devargs->virt.drv_name,
devargs->args);
else
fprintf(f, " UNKNOWN %s\n", devargs->args);
struct {
/** Driver name. */
char drv_name[32];
- } virtual;
+ } virt;
};
/** Arguments string as given by user or "" for no argument. */
char *args;