X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fexception_path%2Fmain.c;h=85dbd7ec745255f6b7b8e469091777a372ad6f7e;hb=ef2bf3dee265d6009cf71e476b3f04741df3cc12;hp=f3c0206b534a3f2ea4a1a6d648740765422427a6;hpb=f430bbcecf3eed93916f45654f51dd19d6955aa2;p=dpdk.git diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c index f3c0206b53..85dbd7ec74 100644 --- a/examples/exception_path/main.c +++ b/examples/exception_path/main.c @@ -488,6 +488,7 @@ check_all_ports_link_status(uint32_t port_mask) uint16_t portid; uint8_t count, all_ports_up, print_flag = 0; struct rte_eth_link link; + int ret; printf("\nChecking link status"); fflush(stdout); @@ -497,7 +498,14 @@ check_all_ports_link_status(uint32_t port_mask) if ((port_mask & (1 << portid)) == 0) continue; memset(&link, 0, sizeof(link)); - rte_eth_link_get_nowait(portid, &link); + ret = rte_eth_link_get_nowait(portid, &link); + if (ret < 0) { + all_ports_up = 0; + if (print_flag == 1) + printf("Port %u link get failed: %s\n", + portid, rte_strerror(-ret)); + continue; + } /* print link status if flag set */ if (print_flag == 1) { if (link.link_status)