X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl3fwd%2Fl3fwd_lpm.h;h=d730d72a2090633e9c82b01b9973e95d076a199f;hb=01863b9d2354c6738581c68fbc5cda84b30862d8;hp=b68868f4435a3464f2d3fbb43810df299af600c6;hpb=3998e2a07220844d3f3c17f76a781ced3efe0de0;p=dpdk.git diff --git a/examples/l3fwd/l3fwd_lpm.h b/examples/l3fwd/l3fwd_lpm.h index b68868f443..d730d72a20 100644 --- a/examples/l3fwd/l3fwd_lpm.h +++ b/examples/l3fwd/l3fwd_lpm.h @@ -9,16 +9,16 @@ static __rte_always_inline void l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid, struct lcore_conf *qconf) { - struct ether_hdr *eth_hdr; - struct ipv4_hdr *ipv4_hdr; + struct rte_ether_hdr *eth_hdr; + struct rte_ipv4_hdr *ipv4_hdr; uint16_t dst_port; - eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); + 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 *, - sizeof(struct ether_hdr)); + ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *, + sizeof(struct rte_ether_hdr)); #ifdef DO_RFC_1812_CHECKS /* Check to make sure the packet is valid (RFC1812) */ @@ -43,15 +43,16 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid, *(uint64_t *)ð_hdr->d_addr = dest_eth_addr[dst_port]; /* src addr */ - ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port], + ð_hdr->s_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 *, - sizeof(struct ether_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, qconf->ipv6_lookup_struct); @@ -64,7 +65,8 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid, *(uint64_t *)ð_hdr->d_addr = dest_eth_addr[dst_port]; /* src addr */ - ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port], + ð_hdr->s_addr); send_single_packet(qconf, m, dst_port); } else {