android_kernel_xiaomi_sm8350/net/bridge
Eric Dumazet 255d0dc340 netfilter: x_table: speedup compat operations
One iptables invocation with 135000 rules takes 35 seconds of cpu time
on a recent server, using a 32bit distro and a 64bit kernel.

We eventually trigger NMI/RCU watchdog.

INFO: rcu_sched_state detected stall on CPU 3 (t=6000 jiffies)

COMPAT mode has quadratic behavior and consume 16 bytes of memory per
rule.

Switch the xt_compat algos to use an array instead of list, and use a
binary search to locate an offset in the sorted array.

This halves memory need (8 bytes per rule), and removes quadratic
behavior [ O(N*N) -> O(N*log2(N)) ]

Time of iptables goes from 35 s to 150 ms.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2011-01-13 12:05:12 +01:00
..
netfilter netfilter: x_table: speedup compat operations 2011-01-13 12:05:12 +01:00
br_device.c net: Abstract away all dst_entry metrics accesses. 2010-12-09 10:46:36 -08:00
br_fdb.c bridge: fix RCU races with bridge port 2010-11-15 11:13:17 -08:00
br_forward.c net: bridge: check the length of skb after nf_bridge_maybe_copy_header() 2011-01-06 11:33:05 -08:00
br_if.c bridge: add RCU annotations to bridge port lookup 2010-11-15 11:13:18 -08:00
br_input.c bridge: add proper RCU annotation to should_route_hook 2010-11-15 11:13:16 -08:00
br_ioctl.c bridge: change console message interface 2010-05-15 23:10:02 -07:00
br_multicast.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-01-04 11:57:25 -08:00
br_netfilter.c bridge: Use consistent NF_DROP returns in nf_pre_routing 2010-12-10 16:04:53 -08:00
br_netlink.c bridge: add RCU annotations to bridge port lookup 2010-11-15 11:13:18 -08:00
br_notify.c bridge: add RCU annotations to bridge port lookup 2010-11-15 11:13:18 -08:00
br_private_stp.h
br_private.h bridge: add RCU annotations to bridge port lookup 2010-11-15 11:13:18 -08:00
br_stp_bpdu.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-01-04 11:57:25 -08:00
br_stp_if.c net/bridge: fix trivial sparse errors 2011-01-03 13:29:18 -08:00
br_stp_timer.c bridge: change console message interface 2010-05-15 23:10:02 -07:00
br_stp.c bridge: change console message interface 2010-05-15 23:10:02 -07:00
br_sysfs_br.c bridge: add per bridge device controls for invoking iptables 2010-07-02 09:32:57 +02:00
br_sysfs_if.c bridge: update sysfs link names if port device names have changed 2010-05-15 23:10:15 -07:00
br.c bridge: add proper RCU annotation to should_route_hook 2010-11-15 11:13:16 -08:00
Kconfig bridge br_multicast: IPv6 MLD support. 2010-04-23 13:35:56 +09:00
Makefile