Subject: Re: netfilter 07/41: arp_tables: unfold two critical loops in arp_packet_match()

From: Andi Kleen <[email-masked]>
Date: Wed, 25 Mar 2009 11:33:32 +0100

David Miller <[email-masked]> writes:
>
> memcmp() can't make any assumptions about alignment.

Newer gcc often[1] knows how to generate specialized aligned memcmp()
based on the type alignment.

However you need to make sure the input types are right.

So in theories some casts might be enough given a new enough
compiler.

[1] not always unfortunately, sometimes it loses this information.

-Andi

-- 
[email-masked] -- Speaking for myself only.