ETHER_ADDR_EQUAL_64B(9) Network device support ETHER_ADDR_EQUAL_64B(9)

NAME ether_addr_equal_64bits - Compare two Ethernet addresses

SYNOPSIS bool ether_addr_equal_64bits(const u8 addr1[6+2], const u8 addr2[6+2]);

ARGUMENTS addr1[6+2] Pointer to an array of 8 bytes

addr2[6+2] Pointer to an other array of 8 bytes

DESCRIPTION Compare two ethernet addresses, returns true if equal, false otherwise.

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.

COPYRIGHT Kernel Hackers Manual 2.6. April 2016 ETHER_ADDR_EQUAL_64B(9)