X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.c;h=308c1b7256c632f53200e9c4e24b85a773e2fe8a;hb=f3a1188cee4a5f2599fb88f17b237fbe03127d6e;hp=132ce81fe748edd41cd44660349995bb0b9deeda;hpb=02823c1db0bc4525b05c48fb301413d232b231ee;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 132ce81fe7..308c1b7256 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1810,21 +1810,14 @@ static void rmv_event_callback(void *arg) { struct rte_eth_dev *dev; - struct rte_devargs *da; - char name[32] = ""; uint8_t port_id = (intptr_t)arg; RTE_ETH_VALID_PORTID_OR_RET(port_id); dev = &rte_eth_devices[port_id]; - da = dev->device->devargs; stop_port(port_id); close_port(port_id); - if (da->type == RTE_DEVTYPE_VIRTUAL) - snprintf(name, sizeof(name), "%s", da->virt.drv_name); - else if (da->type == RTE_DEVTYPE_WHITELISTED_PCI) - rte_pci_device_name(&da->pci.addr, name, sizeof(name)); - printf("removing device %s\n", name); + printf("removing device %s\n", dev->device->name); rte_eal_dev_detach(dev->device); dev->state = RTE_ETH_DEV_UNUSED; }