X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=examples%2Fperformance-thread%2Fl3fwd-thread%2Fmain.c;h=8e28c16e130cd93c6f625f27f5aba8e413eba18d;hp=b29ed9e978aed8b59311df8ad2d30bbe833aa675;hb=538da7a1cad25fbdffe298c8ca76fc4dbd262d1b;hpb=6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1 diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index b29ed9e978..8e28c16e13 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -1070,14 +1070,14 @@ simple_ipv4_fwd_8pkts(struct rte_mbuf *m[8], uint16_t portid) *(uint64_t *)ð_hdr[7]->d_addr = dest_eth_addr[dst_port[7]]; /* src addr */ - ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[1]], ð_hdr[1]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[2]], ð_hdr[2]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[3]], ð_hdr[3]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[4]], ð_hdr[4]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[5]], ð_hdr[5]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[6]], ð_hdr[6]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[7]], ð_hdr[7]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[1]], ð_hdr[1]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[2]], ð_hdr[2]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[3]], ð_hdr[3]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[4]], ð_hdr[4]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[5]], ð_hdr[5]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[6]], ð_hdr[6]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[7]], ð_hdr[7]->s_addr); send_single_packet(m[0], (uint8_t)dst_port[0]); send_single_packet(m[1], (uint8_t)dst_port[1]); @@ -1204,14 +1204,14 @@ simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint16_t portid) *(uint64_t *)ð_hdr[7]->d_addr = dest_eth_addr[dst_port[7]]; /* src addr */ - ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[1]], ð_hdr[1]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[2]], ð_hdr[2]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[3]], ð_hdr[3]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[4]], ð_hdr[4]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[5]], ð_hdr[5]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[6]], ð_hdr[6]->s_addr); - ether_addr_copy(&ports_eth_addr[dst_port[7]], ð_hdr[7]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[0]], ð_hdr[0]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[1]], ð_hdr[1]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[2]], ð_hdr[2]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[3]], ð_hdr[3]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[4]], ð_hdr[4]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[5]], ð_hdr[5]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[6]], ð_hdr[6]->s_addr); + rte_ether_addr_copy(&ports_eth_addr[dst_port[7]], ð_hdr[7]->s_addr); send_single_packet(m[0], dst_port[0]); send_single_packet(m[1], dst_port[1]); @@ -1262,7 +1262,8 @@ l3fwd_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(m, dst_port); } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { @@ -1283,7 +1284,8 @@ l3fwd_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(m, dst_port); } else @@ -3024,7 +3026,7 @@ print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr) { char buf[ETHER_ADDR_FMT_SIZE]; - ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr); + rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr); printf("%s%s", name, buf); } @@ -3582,7 +3584,7 @@ main(int argc, char **argv) /* * prepare src MACs for each port. */ - ether_addr_copy(&ports_eth_addr[portid], + rte_ether_addr_copy(&ports_eth_addr[portid], (struct rte_ether_addr *)(val_eth + portid) + 1); /* init memory */