New upstream version 16.11.9
[deb_dpdk.git] / examples / ipv4_multicast / main.c
index 96b4157..d2e1bfb 100644 (file)
@@ -63,7 +63,6 @@
 #include <rte_debug.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
-#include <rte_ring.h>
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
@@ -146,7 +145,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .hw_vlan_filter = 0, /**< VLAN filtering disabled */
                .jumbo_frame    = 1, /**< Jumbo Frame Support enabled */
-               .hw_strip_crc   = 0, /**< CRC stripped by hardware */
+               .hw_strip_crc   = 1, /**< CRC stripped by hardware */
        },
        .txmode = {
                .mq_mode = ETH_MQ_TX_NONE,
@@ -302,8 +301,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
        hdr->tx_offload = pkt->tx_offload;
        hdr->hash = pkt->hash;
 
-       hdr->ol_flags = pkt->ol_flags;
-
        __rte_mbuf_sanity_check(hdr, 1);
        return hdr;
 }
@@ -321,7 +318,7 @@ mcast_send_pkt(struct rte_mbuf *pkt, struct ether_addr *dest_addr,
 
        /* Construct Ethernet header. */
        ethdr = (struct ether_hdr *)rte_pktmbuf_prepend(pkt, (uint16_t)sizeof(*ethdr));
-       RTE_MBUF_ASSERT(ethdr != NULL);
+       RTE_ASSERT(ethdr != NULL);
 
        ether_addr_copy(dest_addr, &ethdr->d_addr);
        ether_addr_copy(&ports_eth_addr[port], &ethdr->s_addr);
@@ -353,7 +350,7 @@ mcast_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf)
 
        /* Remove the Ethernet header from the input packet */
        iphdr = (struct ipv4_hdr *)rte_pktmbuf_adj(m, (uint16_t)sizeof(struct ether_hdr));
-       RTE_MBUF_ASSERT(iphdr != NULL);
+       RTE_ASSERT(iphdr != NULL);
 
        dest_addr = rte_be_to_cpu_32(iphdr->dst_addr);