[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090324.132954.148903398.davem@davemloft.net>
Date: Tue, 24 Mar 2009 13:29:54 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: kaber@...sh.net
Cc: netdev@...r.kernel.org, netfilter-devel@...r.kernel.org
Subject: Re: netfilter 07/41: arp_tables: unfold two critical loops in
arp_packet_match()
From: Patrick McHardy <kaber@...sh.net>
Date: Tue, 24 Mar 2009 15:03:16 +0100 (MET)
> +/*
> + * Unfortunatly, _b and _mask are not aligned to an int (or long int)
> + * Some arches dont care, unrolling the loop is a win on them.
> + */
> +static unsigned long ifname_compare(const char *_a, const char *_b, const char *_mask)
> +{
> +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
> + const unsigned long *a = (const unsigned long *)_a;
> + const unsigned long *b = (const unsigned long *)_b;
I think we can at least give some help for the platforms which
require alignment.
We can, for example, assume 16-bit alignment and thus loop
over u16's
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists