openwrtv4/target/linux/generic
Daniel Golle 51c094e703 kernel: enable CONFIG_BRIDGE_VLAN_FILTERING
This allows us to use the bridge as a managed switch and gracefully
handle mixed tagged and untagged frames. Prior to this, the only
alternative was creating one bridge per vlan which quickly becomes a
nightmare and still won't let you mix both tagged and untagged frames on
the physical port without some complex ebtables magic.

This is in line with the notion that OpenWRT is the network go-to swiss
army knife when you need a nice set-and-forget, low maintenance box to
handle a specific task.

Current builds of the ip-bridge package already fully support this
feature so the only requirement is enabling the kernel config.

This is disabled by default so existing bridge configurations will not
be affected.  This patch only gives the ability to turn it on with an
'ip link' command.  If there is interest, I could look into making the
feature accessible via uci configuration.

It causes about 3.1% hit on raw bridging speed, which is relatively
trivial considering that I had to use 300 byte packets to strain the CPU
enough to notice a slowdown at all.  The ER8 would chug along at wire
speed otherwise, and that's using only one core.  Since the typical
bridge use case on OpenWRT is wireless, I doubt it would be noticeable
at all.

With BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300
------------------------------------------------------------
Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.12 port 58045 connected with 192.168.1.105 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414986 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   811 MBytes   680 Mbits/sec   0.000 ms
581210/3414986 (0%)

Without BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300
------------------------------------------------------------
Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.12 port 36645 connected with 192.168.1.105 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414990 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   836 MBytes   701 Mbits/sec   0.000 ms
493950/3414990 (0%)

In terms of kernel size, it uses 16KB (6753K vs 6737K on ER8) so a
0.002% hit.  The exact 16KB is probably just due to how the kernel is
compressed.

Suggested-by: Jonathan Thibault <jonathan@navigue.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-11-25 15:24:49 +01:00
..
backport-4.9 kernel: bump 4.9 to 4.9.137 2018-11-14 16:27:43 +01:00
backport-4.14 kernel: bump 4.14 to 4.14.82 2018-11-22 10:49:01 +01:00
files kernel: add missing version.h include to the TP-LINK parser 2018-11-24 11:48:47 +01:00
hack-4.9 kernel: bump 4.9 to 4.9.134 2018-10-19 10:01:57 +02:00
hack-4.14 kernel: bump 4.14 to 4.14.81 2018-11-14 16:27:43 +01:00
image treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
other-files kernel: move initramfs's init script out of base-files 2017-04-04 14:06:40 +02:00
pending-3.18 kernel: bump 3.18 to 3.18.126 2018-11-22 12:40:19 +01:00
pending-4.9 kernel: drop unused arch_split_mtd_part() 2018-11-24 12:24:02 +01:00
pending-4.14 kernel: drop unused arch_split_mtd_part() 2018-11-24 12:24:02 +01:00
config-3.18 kernel: enable memory compaction 2018-10-09 14:29:55 +02:00
config-4.9 kernel: enable CONFIG_BRIDGE_VLAN_FILTERING 2018-11-25 15:24:49 +01:00
config-4.14 kernel: enable CONFIG_BRIDGE_VLAN_FILTERING 2018-11-25 15:24:49 +01:00
PATCHES