summaryrefslogtreecommitdiff
path: root/examples/l3fwd
diff options
context:
space:
mode:
authorOlivier Matz <olivier.matz@6wind.com>2019-05-21 18:13:04 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-05-24 13:34:45 +0200
commit538da7a1cad25fbdffe298c8ca76fc4dbd262d1b (patch)
treec658a60595b1dec44557da57a2b6259a3d286854 /examples/l3fwd
parent6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1 (diff)
downloaddpdk-538da7a1cad25fbdffe298c8ca76fc4dbd262d1b.zip
dpdk-538da7a1cad25fbdffe298c8ca76fc4dbd262d1b.tar.gz
dpdk-538da7a1cad25fbdffe298c8ca76fc4dbd262d1b.tar.xz
net: add rte prefix to ether functions
Add 'rte_' prefix to functions: - rename is_same_ether_addr() as rte_is_same_ether_addr(). - rename is_zero_ether_addr() as rte_is_zero_ether_addr(). - rename is_unicast_ether_addr() as rte_is_unicast_ether_addr(). - rename is_multicast_ether_addr() as rte_is_multicast_ether_addr(). - rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr(). - rename is_universal_ether_addr() as rte_is_universal_ether_addr(). - rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr(). - rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr(). - rename eth_random_addr() as rte_eth_random_addr(). - rename ether_addr_copy() as rte_ether_addr_copy(). - rename ether_format_addr() as rte_ether_format_addr(). Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'examples/l3fwd')
-rw-r--r--examples/l3fwd/l3fwd_em.h6
-rw-r--r--examples/l3fwd/l3fwd_lpm.h6
-rw-r--r--examples/l3fwd/main.c4
3 files changed, 10 insertions, 6 deletions
diff --git a/examples/l3fwd/l3fwd_em.h b/examples/l3fwd/l3fwd_em.h
index de1278b..e787691 100644
--- a/examples/l3fwd/l3fwd_em.h
+++ b/examples/l3fwd/l3fwd_em.h
@@ -47,7 +47,8 @@ l3fwd_em_simple_forward(struct rte_mbuf *m, uint16_t portid,
*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
/* src addr */
- ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+ rte_ether_addr_copy(&ports_eth_addr[dst_port],
+ &eth_hdr->s_addr);
send_single_packet(qconf, m, dst_port);
} else if (tcp_or_udp && (l3_ptypes == RTE_PTYPE_L3_IPV6)) {
@@ -68,7 +69,8 @@ l3fwd_em_simple_forward(struct rte_mbuf *m, uint16_t portid,
*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
/* src addr */
- ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+ rte_ether_addr_copy(&ports_eth_addr[dst_port],
+ &eth_hdr->s_addr);
send_single_packet(qconf, m, dst_port);
} else {
diff --git a/examples/l3fwd/l3fwd_lpm.h b/examples/l3fwd/l3fwd_lpm.h
index 0c98d3f..950cde3 100644
--- a/examples/l3fwd/l3fwd_lpm.h
+++ b/examples/l3fwd/l3fwd_lpm.h
@@ -43,7 +43,8 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,
*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
/* src addr */
- ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+ rte_ether_addr_copy(&ports_eth_addr[dst_port],
+ &eth_hdr->s_addr);
send_single_packet(qconf, m, dst_port);
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
@@ -64,7 +65,8 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,
*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
/* src addr */
- ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+ rte_ether_addr_copy(&ports_eth_addr[dst_port],
+ &eth_hdr->s_addr);
send_single_packet(qconf, m, dst_port);
} else {
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index b0a700a..3f4625a 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -650,7 +650,7 @@ static void
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);
}
@@ -914,7 +914,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 */