* 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. */
| 93 | * False (0) otherwise. |
| 94 | */ |
| 95 | static 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. |
no outgoing calls