diff options
Diffstat (limited to 'examples')
28 files changed, 81 insertions, 69 deletions
diff --git a/examples/bond/main.c b/examples/bond/main.c index 38d1b40..f053e5b 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -390,12 +390,13 @@ static int lcore_main(__attribute__((unused)) void *arg1) if (arp_hdr->arp_opcode == rte_cpu_to_be_16(RTE_ARP_OP_REQUEST)) { arp_hdr->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY); /* Switch src and dst data and set bonding MAC */ - ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr); + rte_ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr); rte_eth_macaddr_get(BOND_PORT, ð_hdr->s_addr); - ether_addr_copy(&arp_hdr->arp_data.arp_sha, &arp_hdr->arp_data.arp_tha); + rte_ether_addr_copy(&arp_hdr->arp_data.arp_sha, + &arp_hdr->arp_data.arp_tha); arp_hdr->arp_data.arp_tip = arp_hdr->arp_data.arp_sip; rte_eth_macaddr_get(BOND_PORT, &d_addr); - ether_addr_copy(&d_addr, &arp_hdr->arp_data.arp_sha); + rte_ether_addr_copy(&d_addr, &arp_hdr->arp_data.arp_sha); arp_hdr->arp_data.arp_sip = bond_ip; rte_eth_tx_burst(BOND_PORT, 0, &pkts[i], 1); is_free = 1; @@ -410,7 +411,7 @@ static int lcore_main(__attribute__((unused)) void *arg1) } ipv4_hdr = (struct ipv4_hdr *)((char *)(eth_hdr + 1) + offset); if (ipv4_hdr->dst_addr == bond_ip) { - ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr); + rte_ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr); rte_eth_macaddr_get(BOND_PORT, ð_hdr->s_addr); ipv4_hdr->dst_addr = ipv4_hdr->src_addr; ipv4_hdr->src_addr = bond_ip; diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c index 27c22cf..3d2a70d 100644 --- a/examples/ethtool/ethtool-app/main.c +++ b/examples/ethtool/ethtool-app/main.c @@ -161,8 +161,8 @@ static void process_frame(struct app_port *ptr_port, struct rte_ether_hdr *ptr_mac_hdr; ptr_mac_hdr = rte_pktmbuf_mtod(ptr_frame, struct rte_ether_hdr *); - ether_addr_copy(&ptr_mac_hdr->s_addr, &ptr_mac_hdr->d_addr); - ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr); + rte_ether_addr_copy(&ptr_mac_hdr->s_addr, &ptr_mac_hdr->d_addr); + rte_ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr); } static int slave_main(__attribute__((unused)) void *ptr_data) diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c index 299488c..571c4e5 100644 --- a/examples/ethtool/lib/rte_ethtool.c +++ b/examples/ethtool/lib/rte_ethtool.c @@ -327,7 +327,7 @@ rte_ethtool_net_validate_addr(uint16_t port_id __rte_unused, { if (addr == NULL) return -EINVAL; - return is_valid_assigned_ether_addr(addr); + return rte_is_valid_assigned_ether_addr(addr); } int diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h index ef23d96..8e30393 100644 --- a/examples/eventdev_pipeline/pipeline_common.h +++ b/examples/eventdev_pipeline/pipeline_common.h @@ -104,8 +104,8 @@ exchange_mac(struct rte_mbuf *m) /* change mac addresses on packet (to use mbuf data) */ eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); - ether_addr_copy(ð->d_addr, &addr); - ether_addr_copy(&addr, ð->d_addr); + rte_ether_addr_copy(ð->d_addr, &addr); + rte_ether_addr_copy(&addr, ð->d_addr); } static __rte_always_inline void diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c index 7b8e7c4..cf94218 100644 --- a/examples/flow_filtering/main.c +++ b/examples/flow_filtering/main.c @@ -48,7 +48,7 @@ static inline void print_ether_addr(const char *what, 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", what, buf); } diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index a9efb4b..8d82a64 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -354,7 +354,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf, *((uint64_t *)d_addr_bytes) = 0x000000000002 + ((uint64_t)port_out << 40); /* src addr */ - ether_addr_copy(&ports_eth_addr[port_out], ð_hdr->s_addr); + rte_ether_addr_copy(&ports_eth_addr[port_out], + ð_hdr->s_addr); if (ipv6) eth_hdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv6); else @@ -572,7 +573,7 @@ static void print_ethaddr(const char *name, 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); } diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index d9ecac0..fe92fcd 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -410,7 +410,7 @@ reassemble(struct rte_mbuf *m, uint16_t portid, uint32_t queue, *((uint64_t *)d_addr_bytes) = 0x000000000002 + ((uint64_t)dst_port << 40); /* 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); } @@ -695,7 +695,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); } diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 66e9216..9a2c6e3 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1428,7 +1428,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); } diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index a047197..9383752 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -278,8 +278,8 @@ mcast_send_pkt(struct rte_mbuf *pkt, struct rte_ether_addr *dest_addr, rte_pktmbuf_prepend(pkt, (uint16_t)sizeof(*ethdr)); RTE_ASSERT(ethdr != NULL); - ether_addr_copy(dest_addr, ðdr->d_addr); - ether_addr_copy(&ports_eth_addr[port], ðdr->s_addr); + rte_ether_addr_copy(dest_addr, ðdr->d_addr); + rte_ether_addr_copy(&ports_eth_addr[port], ðdr->s_addr); ethdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4); /* Put new packet into the output queue */ @@ -540,7 +540,7 @@ static void print_ethaddr(const char *name, 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); } diff --git a/examples/kni/main.c b/examples/kni/main.c index 8bea071..a6d6fc2 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -835,7 +835,7 @@ static void print_ethaddr(const char *name, struct rte_ether_addr *mac_addr) { char buf[ETHER_ADDR_FMT_SIZE]; - ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, mac_addr); + rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, mac_addr); RTE_LOG(INFO, APP, "\t%s%s\n", name, buf); } diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index dd09855..a77b000 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -603,7 +603,7 @@ l2fwd_mac_updating(struct rte_mbuf *m, uint16_t dest_portid) *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dest_portid << 40); /* src addr */ - ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], ð->s_addr); + rte_ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], ð->s_addr); } static void diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c index 033104d..77e44dc 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -349,7 +349,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid) *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); /* src addr */ - ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], ð->s_addr); + rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], ð->s_addr); buffer = tx_buffer[dst_port]; sent = rte_eth_tx_buffer(dst_port, 0, buffer, m); diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c index 21d1993..9831a43 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -179,7 +179,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid) *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); /* src addr */ - ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], ð->s_addr); + rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], ð->s_addr); buffer = tx_buffer[dst_port]; sent = rte_eth_tx_buffer(dst_port, 0, buffer, m); diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index c1d6797..1e2b142 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -161,7 +161,7 @@ l2fwd_mac_updating(struct rte_mbuf *m, unsigned dest_portid) *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dest_portid << 40); /* src addr */ - ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], ð->s_addr); + rte_ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], ð->s_addr); } static void diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index 3a0f582..4b15853 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -1757,7 +1757,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); } diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index bcd584d..7f7be22 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -700,7 +700,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid, #endif /* 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)) { @@ -725,7 +726,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid, 0x000000000002 + ((uint64_t)dst_port << 40); /* 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 @@ -1580,7 +1582,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); } diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c index 2c0c89e..56a55ac 100644 --- a/examples/l3fwd-vf/main.c +++ b/examples/l3fwd-vf/main.c @@ -450,7 +450,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid, #endif /* 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); @@ -791,7 +791,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); } 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 *)ð_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 (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 *)ð_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 { 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 *)ð_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)) { @@ -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 { 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 */ diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index 9997c58..9cd4dc7 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -176,7 +176,7 @@ lsi_simple_forward(struct rte_mbuf *m, unsigned portid) *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); /* src addr */ - ether_addr_copy(&lsi_ports_eth_addr[dst_port], ð->s_addr); + rte_ether_addr_copy(&lsi_ports_eth_addr[dst_port], ð->s_addr); buffer = tx_buffer[dst_port]; sent = rte_eth_tx_buffer(dst_port, 0, buffer, m); diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index b29ed9e..8e28c16 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 */ diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index 7d28f59..1266f52 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -401,7 +401,7 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data) rte_eth_macaddr_get(ptp_data->portid, ð_hdr->s_addr); /* Set multicast address 01-1B-19-00-00-00. */ - ether_addr_copy(ð_multicast, ð_hdr->d_addr); + rte_ether_addr_copy(ð_multicast, ð_hdr->d_addr); eth_hdr->ether_type = htons(PTP_PROTOCOL); ptp_msg = (struct ptp_message *) diff --git a/examples/quota_watermark/qw/main.c b/examples/quota_watermark/qw/main.c index 61e92a8..a61360b 100644 --- a/examples/quota_watermark/qw/main.c +++ b/examples/quota_watermark/qw/main.c @@ -67,7 +67,7 @@ static void send_pause_frame(uint16_t port_id, uint16_t duration) pause_frame = (struct ether_fc_frame *) &hdr[1]; rte_eth_macaddr_get(port_id, &mac_addr); - ether_addr_copy(&mac_addr, &hdr->s_addr); + rte_ether_addr_copy(&mac_addr, &hdr->s_addr); void *tmp = &hdr->d_addr.addr_bytes[0]; *((uint64_t *)tmp) = 0x010000C28001ULL; diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index e4af7bc..3316df1 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -243,7 +243,7 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m) /* Learn MAC address of guest device from packet */ pkt_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); - if (is_same_ether_addr(&(pkt_hdr->s_addr), &vdev->mac_address)) { + if (rte_is_same_ether_addr(&(pkt_hdr->s_addr), &vdev->mac_address)) { RTE_LOG(INFO, VHOST_DATA, "(%d) WARNING: This device is using an existing" " MAC address and has not been registered.\n", @@ -261,11 +261,11 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m) memset(&tunnel_filter_conf, 0, sizeof(struct rte_eth_tunnel_filter_conf)); - ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac); + rte_ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac); tunnel_filter_conf.filter_type = tep_filter_type[filter_idx]; /* inner MAC */ - ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac); + rte_ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac); tunnel_filter_conf.queue_id = vdev->rx_q; tunnel_filter_conf.tenant_id = tenant_id_conf[vdev->rx_q]; @@ -309,9 +309,9 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m) } vxdev.out_key = tenant_id_conf[vdev->rx_q]; - ether_addr_copy(&vxdev.port[portid].peer_mac, + rte_ether_addr_copy(&vxdev.port[portid].peer_mac, &app_l2_hdr[portid].d_addr); - ether_addr_copy(&ports_eth_addr[0], + rte_ether_addr_copy(&ports_eth_addr[0], &app_l2_hdr[portid].s_addr); app_l2_hdr[portid].ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4); @@ -349,8 +349,10 @@ vxlan_unlink(struct vhost_dev *vdev) memset(&tunnel_filter_conf, 0, sizeof(struct rte_eth_tunnel_filter_conf)); - ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac); - ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac); + rte_ether_addr_copy(&ports_eth_addr[0], + &tunnel_filter_conf.outer_mac); + rte_ether_addr_copy(&vdev->mac_address, + &tunnel_filter_conf.inner_mac); tunnel_filter_conf.tenant_id = tenant_id_conf[vdev->rx_q]; tunnel_filter_conf.filter_type = tep_filter_type[filter_idx]; diff --git a/examples/vhost/main.c b/examples/vhost/main.c index cd1a51b..f4f0fc8 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -666,7 +666,7 @@ find_vhost_dev(struct rte_ether_addr *mac) TAILQ_FOREACH(vdev, &vhost_dev_list, global_vdev_entry) { if (vdev->ready == DEVICE_RX && - is_same_ether_addr(mac, &vdev->mac_address)) + rte_is_same_ether_addr(mac, &vdev->mac_address)) return vdev; } @@ -916,7 +916,7 @@ virtio_tx_route(struct vhost_dev *vdev, struct rte_mbuf *m, uint16_t vlan_tag) nh = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); - if (unlikely(is_broadcast_ether_addr(&nh->d_addr))) { + if (unlikely(rte_is_broadcast_ether_addr(&nh->d_addr))) { struct vhost_dev *vdev2; TAILQ_FOREACH(vdev2, &vhost_dev_list, global_vdev_entry) { diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index 5195a51..7281ffd 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -417,7 +417,7 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port) *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); /* src addr */ - ether_addr_copy(&vmdq_ports_eth_addr[dst_port], ð->s_addr); + rte_ether_addr_copy(&vmdq_ports_eth_addr[dst_port], ð->s_addr); } /* When we receive a HUP signal, print out our stats */ diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index 75cf31a..3890003 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -504,7 +504,7 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port) *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); /* src addr */ - ether_addr_copy(&vmdq_ports_eth_addr[dst_port], ð->s_addr); + rte_ether_addr_copy(&vmdq_ports_eth_addr[dst_port], ð->s_addr); } /* When we receive a HUP signal, print out our stats */ |