net/iavf: add GTPU in default hash
[dpdk.git] / app / test-pmd / icmpecho.c
index c055fc9..78e3adf 100644 (file)
@@ -188,7 +188,7 @@ ip_proto_name(uint16_t ip_proto)
                "PIM",        /**< Protocol Independent Mcast */
        };
 
-       if (ip_proto < sizeof(ip_proto_names) / sizeof(ip_proto_names[0]))
+       if (ip_proto < RTE_DIM(ip_proto_names))
                return ip_proto_names[ip_proto];
        switch (ip_proto) {
 #ifdef IPPROTO_PGM
@@ -308,12 +308,12 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
         */
        nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,
                                 nb_pkt_per_burst);
-       if (unlikely(nb_rx == 0))
-               return;
-
 #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
        fs->rx_burst_stats.pkt_burst_spread[nb_rx]++;
 #endif
+       if (unlikely(nb_rx == 0))
+               return;
+
        fs->rx_packets += nb_rx;
        nb_replies = 0;
        for (i = 0; i < nb_rx; i++) {
@@ -360,7 +360,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
                        }
                        if ((RTE_BE_TO_CPU_16(arp_h->arp_hardware) !=
                             RTE_ARP_HRD_ETHER) ||
-                           (arp_pro != RTE_ETHER_TYPE_IPv4) ||
+                           (arp_pro != RTE_ETHER_TYPE_IPV4) ||
                            (arp_h->arp_hlen != 6) ||
                            (arp_h->arp_plen != 4)
                            ) {
@@ -414,7 +414,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
                        continue;
                }
 
-               if (eth_type != RTE_ETHER_TYPE_IPv4) {
+               if (eth_type != RTE_ETHER_TYPE_IPV4) {
                        rte_pktmbuf_free(pkt);
                        continue;
                }