mempool: return 0 if area is too small on populate
[dpdk.git] / examples / l3fwd-acl / main.c
index 0abb8cb..cccf819 100644 (file)
@@ -1326,7 +1326,7 @@ is_valid_ipv4_pkt(struct rte_ipv4_hdr *pkt, uint32_t link_len)
 
 /* main processing loop */
 static int
-main_loop(__attribute__((unused)) void *dummy)
+main_loop(__rte_unused void *dummy)
 {
        struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
        unsigned lcore_id;
@@ -1968,7 +1968,12 @@ main(int argc, char **argv)
                                "rte_eth_dev_adjust_nb_rx_tx_desc: err=%d, port=%d\n",
                                ret, portid);
 
-               rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+               ret = rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
+               if (ret < 0)
+                       rte_exit(EXIT_FAILURE,
+                               "rte_eth_macaddr_get: err=%d, port=%d\n",
+                               ret, portid);
+
                print_ethaddr(" Address:", &ports_eth_addr[portid]);
                printf(", ");