Files
ack-tegra/drivers/net
Eric Dumazet 93aaae2e01 filter: optimize sk_run_filter
Remove pc variable to avoid arithmetic to compute fentry at each filter
instruction. Jumps directly manipulate fentry pointer.

As the last instruction of filter[] is guaranteed to be a RETURN, and
all jumps are before the last instruction, we dont need to check filter
bounds (number of instructions in filter array) at each iteration, so we
remove it from sk_run_filter() params.

On x86_32 remove f_k var introduced in commit 57fe93b374
(filter: make sure filters dont read uninitialized memory)

Note : We could use a CONFIG_ARCH_HAS_{FEW|MANY}_REGISTERS in order to
avoid too many ifdefs in this code.

This helps compiler to use cpu registers to hold fentry and A
accumulator.

On x86_32, this saves 401 bytes, and more important, sk_run_filter()
runs much faster because less register pressure (One less conditional
branch per BPF instruction)

# size net/core/filter.o net/core/filter_pre.o
   text    data     bss     dec     hex filename
   2948       0       0    2948     b84 net/core/filter.o
   3349       0       0    3349     d15 net/core/filter_pre.o

on x86_64 :
# size net/core/filter.o net/core/filter_pre.o
   text    data     bss     dec     hex filename
   5173       0       0    5173    1435 net/core/filter.o
   5224       0       0    5224    1468 net/core/filter_pre.o

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-19 09:49:59 -08:00
..
2010-11-09 09:17:56 -08:00
2010-10-24 14:55:49 -07:00
2010-11-03 18:50:05 -07:00
2010-11-18 09:33:19 -08:00
2010-11-18 12:07:30 -08:00
2010-10-24 15:07:14 -07:00
2010-10-27 14:24:13 -07:00
2010-11-15 11:13:19 -08:00
2010-10-27 19:43:55 -07:00
2010-11-16 19:27:19 -08:00
2010-09-29 19:45:37 -07:00
2010-10-21 03:09:43 -07:00
2010-11-03 18:50:06 -07:00
2010-11-09 09:17:56 -08:00
2010-11-09 09:17:56 -08:00
2010-11-09 09:17:56 -08:00
2010-07-11 18:15:08 -07:00
2010-11-09 09:17:56 -08:00
2010-11-09 09:17:56 -08:00
2010-08-24 12:24:07 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-10-06 14:10:35 -07:00
2010-10-14 10:45:56 -07:00
2010-10-14 10:45:56 -07:00
2010-07-19 13:32:57 -07:00
2010-07-14 13:40:36 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-09-29 13:23:30 -07:00
2010-09-26 18:34:29 -07:00
2010-11-09 09:17:56 -08:00
2010-09-26 18:34:29 -07:00
2010-08-24 12:23:01 -07:00
2010-11-16 11:39:08 -08:00
2010-09-26 18:34:29 -07:00
2010-10-21 01:26:46 -07:00
2010-10-31 09:32:55 -07:00
2010-10-21 03:52:11 -07:00
2010-11-17 12:25:57 -08:00
2010-07-27 22:24:37 -07:00
2010-11-08 13:50:06 -08:00
2010-11-09 09:17:56 -08:00
2010-11-09 09:17:56 -08:00
2010-09-26 18:34:29 -07:00
2010-11-16 10:58:30 -08:00
2010-09-26 18:34:29 -07:00
2010-06-21 13:40:25 -07:00
2010-07-05 20:08:05 -07:00
2010-06-28 12:41:33 -07:00
2010-09-26 18:34:29 -07:00
2010-09-15 22:06:05 -07:00
2010-10-12 17:36:09 +02:00
2010-11-19 09:49:59 -08:00
2010-08-04 21:53:17 -07:00
2010-09-21 18:04:47 -07:00
2010-09-21 18:04:47 -07:00
2010-09-21 18:04:47 -07:00
2010-07-15 20:46:22 -07:00
2010-08-25 16:41:26 -07:00
2010-09-26 18:34:29 -07:00
2010-10-24 16:25:39 -07:00
2010-09-26 18:34:29 -07:00
2010-07-14 12:17:35 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-11-12 12:21:18 -08:00
2010-09-26 18:34:29 -07:00
2010-11-09 09:17:56 -08:00