X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.c;h=f1325ce9aeeebb7037aab48d32d90b32c1b7bd07;hb=8ea656f8c300175ac84f3cbe1117f5ef11ffc4eb;hp=28d9b26da02721fcefbd41ec72aac462ceec886f;hpb=76ad4a2d82d4d72c3a7ed4675d77268b5fae3cc9;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 28d9b26da0..f1325ce9ae 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -270,6 +270,11 @@ uint8_t no_flush_rx = 0; /* flush by default */ */ uint8_t no_link_check = 0; /* check by default */ +/* + * Enable link status change notification + */ +uint8_t lsc_interrupt = 1; /* enabled by default */ + /* * NIC bypass mode configuration options. */ @@ -1746,6 +1751,9 @@ check_all_ports_link_status(uint32_t port_mask) if (all_ports_up == 1 || count == (MAX_CHECK_TIME - 1)) { print_flag = 1; } + + if (lsc_interrupt) + break; } } @@ -1929,6 +1937,11 @@ init_port_config(void) #ifdef RTE_NIC_BYPASS rte_eth_dev_bypass_init(pid); #endif + + if (lsc_interrupt && + (rte_eth_devices[pid].data->dev_flags & + RTE_ETH_DEV_INTR_LSC)) + port->dev_conf.intr_conf.lsc = 1; } }