Hi,
On 29/11/08 23:40, Holger Schurig wrote:
- if (likely(!compare_ether_addr(tx_hdr->addr2,
rx_hdr->addr1))) + if (likely(!memcmp(tx_hdr->addr2,
rx_hdr->addr1, ETH_ALEN))) {
__skb_unlink(skb, q);
Wouldn't it be better to fix compile_ether_addr instead?
From Documentation/unaligned-memory-access.txt in reference to
compare_ether_addr():
Despite the potential unaligned access problems with the above function, it
is included in the kernel anyway but is understood to only work on
16-bit-aligned addresses. It is up to the caller to ensure this alignment or
not use this function at all. This alignment-unsafe function is still useful
as it is a decent optimization for the cases when you can ensure alignment,
which is true almost all of the time in ethernet networking context.
Hope that helps,
Shaddy
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html