compare_ether_addr_64bits — Compare two Ethernet addresses
unsigned compare_ether_addr_64bits ( | const u8 addr1[6+2], |
const u8 addr2[6+2]) ; |
Compare two ethernet addresses, returns 0 if equal, non-zero otherwise.
Unlike memcmp
, it doesn't return a value suitable for sorting.
The function doesn't need any conditional branches and possibly uses
word memory accesses on CPU allowing cheap unaligned memory reads.
arrays = { byte1, byte2, byte3, byte4, byte6, byte7, pad1, pad2}
Please note that alignment of addr1 & addr2 is only guaranted to be 16 bits.