examples: remove extra new line after link duplex
[dpdk.git] / examples / link_status_interrupt / main.c
index a0b75d9..25efe2b 100644 (file)
@@ -286,7 +286,7 @@ lsi_main_loop(void)
 }
 
 static int
-lsi_launch_one_lcore(__attribute__((unused)) void *dummy)
+lsi_launch_one_lcore(__rte_unused void *dummy)
 {
        lsi_main_loop();
        return 0;
@@ -500,7 +500,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
                                        "Port%d Link Up. Speed %u Mbps - %s\n",
                                                portid, link.link_speed,
                                (link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-                                       ("full-duplex") : ("half-duplex\n"));
+                                       ("full-duplex") : ("half-duplex"));
                                else
                                        printf("Port %d Link Down\n", portid);
                                continue;
@@ -657,8 +657,12 @@ main(int argc, char **argv)
                rte_eth_dev_callback_register(portid,
                        RTE_ETH_EVENT_INTR_LSC, lsi_event_callback, NULL);
 
-               rte_eth_macaddr_get(portid,
+               ret = rte_eth_macaddr_get(portid,
                                    &lsi_ports_eth_addr[portid]);
+               if (ret < 0)
+                       rte_exit(EXIT_FAILURE,
+                                "rte_eth_macaddr_get: err=%d, port=%u\n",
+                                ret, (unsigned int)portid);
 
                /* init one RX queue */
                fflush(stdout);