app/testpmd: fix invalid port detach
[dpdk.git] / app / test-pmd / testpmd.c
index d8ac432..f64dd73 100644 (file)
@@ -2029,6 +2029,9 @@ eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param,
                fflush(stdout);
        }
 
+       if (port_id_is_invalid(port_id, DISABLED_WARN))
+               return 0;
+
        switch (type) {
        case RTE_ETH_EVENT_INTR_RMV:
                if (rte_eal_alarm_set(100000,