X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Fvirtual_pmd.c;h=6e4dcd8f9656de4d823dd028b52755f1e12f49b7;hb=dd0eedb1cfcf0cb7423d859177c5bc6f931eaf8a;hp=b1d40d77ab8801be94d3ff9d90a927d65426a2d7;hpb=09419f235e099ecb265a590778fe64a685a2a241;p=dpdk.git diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index b1d40d77ab..6e4dcd8f96 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -117,7 +117,6 @@ virtual_ethdev_info_get(struct rte_eth_dev *dev __rte_unused, dev_info->max_tx_queues = (uint16_t)512; dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; } static int @@ -485,7 +484,7 @@ virtual_ethdev_simulate_link_status_interrupt(uint8_t port_id, vrtl_eth_dev->data->dev_link.link_status = link_status; - _rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC); + _rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL); } int @@ -581,12 +580,12 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, goto err; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI); + eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) goto err; - pci_dev->numa_node = socket_id; - pci_drv->name = virtual_ethdev_driver_name; + pci_dev->device.numa_node = socket_id; + pci_drv->driver.name = virtual_ethdev_driver_name; pci_drv->id_table = id_table; if (isr_support) @@ -601,10 +600,8 @@ 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->link_intr_cbs)); - eth_dev->data->dev_link.link_status = ETH_LINK_DOWN; - eth_dev->data->dev_link.link_speed = ETH_LINK_SPEED_10000; + eth_dev->data->dev_link.link_speed = ETH_SPEED_NUM_10G; eth_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX; eth_dev->data->mac_addrs = rte_zmalloc(name, ETHER_ADDR_LEN, 0); @@ -625,8 +622,8 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, dev_private->dev_ops = virtual_ethdev_default_dev_ops; eth_dev->dev_ops = &dev_private->dev_ops; - eth_dev->pci_dev = pci_dev; - eth_dev->pci_dev->driver = ð_drv->pci_drv; + pci_dev->device.driver = ð_drv->pci_drv.driver; + eth_dev->device = &pci_dev->device; eth_dev->rx_pkt_burst = virtual_ethdev_rx_burst_success; eth_dev->tx_pkt_burst = virtual_ethdev_tx_burst_success;