common/cnxk: add ROC cache line size constant
[dpdk.git] / examples / l3fwd / l3fwd_lpm.h
index 950cde3..c61b969 100644 (file)
@@ -10,14 +10,14 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,
                struct lcore_conf *qconf)
 {
        struct rte_ether_hdr *eth_hdr;
-       struct ipv4_hdr *ipv4_hdr;
+       struct rte_ipv4_hdr *ipv4_hdr;
        uint16_t dst_port;
 
        eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
        if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
                /* Handle IPv4 headers.*/
-               ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
+               ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
                                                sizeof(struct rte_ether_hdr));
 
 #ifdef DO_RFC_1812_CHECKS
@@ -40,18 +40,18 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,
                ++(ipv4_hdr->hdr_checksum);
 #endif
                /* dst addr */
-               *(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
+               *(uint64_t *)&eth_hdr->dst_addr = dest_eth_addr[dst_port];
 
                /* src addr */
                rte_ether_addr_copy(&ports_eth_addr[dst_port],
-                               &eth_hdr->s_addr);
+                               &eth_hdr->src_addr);
 
                send_single_packet(qconf, m, dst_port);
        } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
                /* Handle IPv6 headers.*/
-               struct ipv6_hdr *ipv6_hdr;
+               struct rte_ipv6_hdr *ipv6_hdr;
 
-               ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct ipv6_hdr *,
+               ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
                                                sizeof(struct rte_ether_hdr));
 
                dst_port = lpm_get_ipv6_dst_port(ipv6_hdr, portid,
@@ -62,11 +62,11 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,
                        dst_port = portid;
 
                /* dst addr */
-               *(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
+               *(uint64_t *)&eth_hdr->dst_addr = dest_eth_addr[dst_port];
 
                /* src addr */
                rte_ether_addr_copy(&ports_eth_addr[dst_port],
-                               &eth_hdr->s_addr);
+                               &eth_hdr->src_addr);
 
                send_single_packet(qconf, m, dst_port);
        } else {