MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_is_same_ether_addr

Function rte_is_same_ether_addr

dpdk/lib/net/rte_ether.h:95–102  ·  view source on GitHub ↗

* Check if two Ethernet addresses are the same. * * @param ea1 * A pointer to the first ether_addr structure containing * the ethernet address. * @param ea2 * A pointer to the second ether_addr structure containing * the ethernet address. * * @return * True (1) if the given two ethernet address are the same; * False (0) otherwise. */

Source from the content-addressed store, hash-verified

93 * False (0) otherwise.
94 */
95static inline int rte_is_same_ether_addr(const struct rte_ether_addr *ea1,
96 const struct rte_ether_addr *ea2)
97{
98 const uint16_t *w1 = (const uint16_t *)ea1;
99 const uint16_t *w2 = (const uint16_t *)ea2;
100
101 return ((w1[0] ^ w2[0]) | (w1[1] ^ w2[1]) | (w1[2] ^ w2[2])) == 0;
102}
103
104/**
105 * Check if an Ethernet address is filled with zeros.

Callers 15

is_same_udp4_flowFunction · 0.85
is_same_vxlan_udp4_flowFunction · 0.85
is_same_vxlan_tcp4_flowFunction · 0.85
eth_mac_cmpFunction · 0.85
mana_get_ifnameFunction · 0.85
mana_pci_probe_macFunction · 0.85
enicpmd_set_mc_addr_listFunction · 0.85
mlx5_os_mac_addr_addFunction · 0.85
bond_mode_alb_arp_recvFunction · 0.85
bond_mode_alb_arp_xmitFunction · 0.85
is_bond_mac_addrFunction · 0.85

Calls

no outgoing calls

Tested by 6

test_format_addrFunction · 0.68
test_unformat_addrFunction · 0.68
add_memberFunction · 0.68
test_mode4_rxFunction · 0.68