eal: introduce macro for always inline
[dpdk.git] / examples / l3fwd / l3fwd_lpm_sse.h
index aa06b6d..fa1b902 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "l3fwd_sse.h"
 
-static inline __attribute__((always_inline)) uint16_t
+static __rte_always_inline uint16_t
 lpm_get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt,
                uint8_t portid)
 {
@@ -75,7 +75,7 @@ lpm_get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt,
  * precalculated. If packet is ipv6 dst_addr is taken directly from packet
  * header and dst_ipv4 value is not used.
  */
-static inline __attribute__((always_inline)) uint16_t
+static __rte_always_inline uint16_t
 lpm_get_dst_port_with_ipv4(const struct lcore_conf *qconf, struct rte_mbuf *pkt,
        uint32_t dst_ipv4, uint8_t portid)
 {
@@ -199,9 +199,11 @@ l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,
        case 3:
                dst_port[j] = lpm_get_dst_port(qconf, pkts_burst[j], portid);
                j++;
+               /* fall-through */
        case 2:
                dst_port[j] = lpm_get_dst_port(qconf, pkts_burst[j], portid);
                j++;
+               /* fall-through */
        case 1:
                dst_port[j] = lpm_get_dst_port(qconf, pkts_burst[j], portid);
                j++;