goto error_exit;
}
- dev = rte_eth_dev_allocate(tap_name);
+ /* name in allocation and data->name must be consistent */
+ snprintf(data->name, sizeof(data->name), "%s", name);
+ dev = rte_eth_dev_allocate(name);
if (!dev) {
RTE_LOG(ERR, PMD, "TAP Unable to allocate device struct\n");
goto error_exit;
dev->driver = NULL;
dev->rx_pkt_burst = pmd_rx_burst;
dev->tx_pkt_burst = pmd_tx_burst;
- snprintf(dev->data->name, sizeof(dev->data->name), "%s", name);
/* Presetup the fds to -1 as being not valid */
for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {