]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ip_tables: unfold two critical loops in ip_packet_match()
authorEric Dumazet <dada1@cosmosbay.com>
Fri, 20 Feb 2009 10:03:33 +0000 (11:03 +0100)
committerPatrick McHardy <kaber@trash.net>
Fri, 20 Feb 2009 10:03:33 +0000 (11:03 +0100)
commit7118e6f9e860c0fb252b45ab46e3813d4ac94d19
tree2b0a51af98e4df407f7bce90ca8cd1a065691b1c
parenta895197b1573d934a98bc3605aca36d7a49ec8ab
netfilter: ip_tables: unfold two critical loops in ip_packet_match()

While doing oprofile tests I noticed two loops are not properly unrolled by gcc

Using a hand coded unrolled loop provides nice speedup : ipt_do_table
credited of 2.52 % of cpu instead of 3.29 % in tbench.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/netfilter/ip_tables.c