app/testpmd: fix incorrect port number check
[dpdk.git] / app / test / virtual_pmd.c
index cd9faf3..9b07ab1 100644 (file)
@@ -580,7 +580,7 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr,
                goto err;
 
        /* reserve an ethdev entry */
-       eth_dev = rte_eth_dev_allocate(name);
+       eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI);
        if (eth_dev == NULL)
                goto err;
 
@@ -600,7 +600,7 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr,
        eth_dev->data->nb_rx_queues = (uint16_t)1;
        eth_dev->data->nb_tx_queues = (uint16_t)1;
 
-       TAILQ_INIT(&(eth_dev->callbacks));
+       TAILQ_INIT(&(eth_dev->link_intr_cbs));
 
        eth_dev->data->dev_link.link_status = 0;
        eth_dev->data->dev_link.link_speed = ETH_LINK_SPEED_10000;