X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.c;h=0a23d823e544f6b319557d759bf1369af866d593;hb=cbb4c648c5dfff6fced96c5c76166a3e0e048fa4;hp=d32cbb96d58aa9f76b377a42207fff7c062d9903;hpb=98a7ea332ba3da0f74ec951595d36a616165b255;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index d32cbb96d5..0a23d823e5 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -299,7 +299,7 @@ uint32_t event_print_mask = (UINT32_C(1) << RTE_ETH_EVENT_UNKNOWN) | * NIC bypass mode configuration options. */ -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS /* The NIC bypass watchdog timeout. */ uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF; #endif @@ -381,9 +381,9 @@ uint8_t bitrate_enabled; /* Forward function declarations */ static void map_port_queue_stats_mapping_registers(uint8_t pi, struct rte_port *port); static void check_all_ports_link_status(uint32_t port_mask); -static void eth_event_callback(uint8_t port_id, - enum rte_eth_event_type type, - void *param); +static int eth_event_callback(uint8_t port_id, + enum rte_eth_event_type type, + void *param, void *ret_param); /* * Check if all the ports are started. @@ -1824,13 +1824,14 @@ rmv_event_callback(void *arg) else if (da->type == RTE_DEVTYPE_WHITELISTED_PCI) rte_pci_device_name(&da->pci.addr, name, sizeof(name)); printf("removing device %s\n", name); - rte_eal_dev_detach(name); + rte_eal_dev_detach(dev->device); dev->state = RTE_ETH_DEV_UNUSED; } /* This function is used by the interrupt thread */ -static void -eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param) +static int +eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param, + void *ret_param) { static const char * const event_desc[] = { [RTE_ETH_EVENT_UNKNOWN] = "Unknown", @@ -1844,6 +1845,7 @@ eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param) }; RTE_SET_USED(param); + RTE_SET_USED(ret_param); if (type >= RTE_ETH_EVENT_MAX) { fprintf(stderr, "\nPort %" PRIu8 ": %s called upon invalid event %d\n", @@ -1864,6 +1866,7 @@ eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param) default: break; } + return 0; } static int @@ -2015,7 +2018,7 @@ init_port_config(void) rte_eth_macaddr_get(pid, &port->eth_addr); map_port_queue_stats_mapping_registers(pid, port); -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS rte_pmd_ixgbe_bypass_init(pid); #endif