- rte_eth_link_get_nowait(port, &link);
- while (!link.link_status) {
+ do {
+ retval = rte_eth_link_get_nowait(port, &link);
+ if (retval < 0) {
+ printf("Failed link get (port %u): %s\n",
+ port, rte_strerror(-retval));
+ return retval;
+ } else if (link.link_status)
+ break;
+