diff options
author | Eric Dumazet <[email protected]> | 2010-12-15 19:45:28 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2010-12-21 12:30:12 -0800 |
commit | 12b16dadbc2406144d408754f96d0f44aa016239 (patch) | |
tree | 1503124f18c7e181963889f254a49a597bf59baa /net/lapb/lapb_in.c | |
parent | cb8f404893bab40431f7eeb2511454031b07e7df (diff) |
filter: optimize accesses to ancillary data
We can translate pseudo load instructions at filter check time to
dedicated instructions to speed up filtering and avoid one switch().
libpcap currently uses SKF_AD_PROTOCOL, but custom filters probably use
other ancillary accesses.
Note : I made the assertion that ancillary data was always accessed with
BPF_LD|BPF_?|BPF_ABS instructions, not with BPF_LD|BPF_?|BPF_IND ones
(offset given by K constant, not by K + X register)
On x86_64, this saves a few bytes of text :
# size net/core/filter.o.*
text data bss dec hex filename
4864 0 0 4864 1300 net/core/filter.o.new
4944 0 0 4944 1350 net/core/filter.o.old
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions