ethdev: use constants for link state
[dpdk.git] / examples / l3fwd-power / main.c
index d4bb7a3..5934efe 100644 (file)
@@ -682,7 +682,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid,
                /* We don't currently handle IPv6 packets in LPM mode. */
                rte_pktmbuf_free(m);
 #endif
-       }
+       } else
+               rte_pktmbuf_free(m);
 
 }
 
@@ -1508,7 +1509,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
                                continue;
                        }
                        /* clear all_ports_up flag if any link down */
-                       if (link.link_status == 0) {
+                       if (link.link_status == ETH_LINK_DOWN) {
                                all_ports_up = 0;
                                break;
                        }