filter: Optimize instruction revalidation code.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tue, 16 Nov 2010 15:19:51 +0000 (15:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Nov 2010 18:58:35 +0000 (10:58 -0800)
commitcba328fc5ede9091616e7296483840869b615a46
tree1ec43203bc3a3e388b0e85a4865cef4702f1d456
parent9e50e3ac5a5bbb1fd2949bdd57444ad1b93e5f41
filter: Optimize instruction revalidation code.

Since repeating u16 value to u8 value conversion using switch() clause's
case statement is wasteful, this patch introduces u16 to u8 mapping table
and removes most of case statements. As a result, the size of net/core/filter.o
is reduced by about 29% on x86.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c