net: bridge: optimize vlan multicast forwarding
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net: bridge: avoid VLAN lookups for multicast router forwardingnet/ net/ | +9 | 0 replies | |
| 2/3 | net: bridge: mdb: index port groups by VLANnet/ net/ | +10 | 0 replies | |
| 3/3 | net: bridge: mdb: avoid VLAN lookups in listener forwardingnet/ net/ net/ +1 more | +42 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next 0/3] net: bridge: optimize vlan multicast forwarding
Hi,
This is the last part of the patch-sets that optimize forwarding by caching VLANs. It adds the forwarding optimizations to the bridge multicast code and also optimizes vlan range add (see tables below).
Patch 01 - use the vlan already stored in the in per-VLAN router context Patch 02 - use a small hash (64 entries) to find the port vlan groups
without walking all
Patch 03 - cache the port-VLAN destination in mdbs to avoid egress VLAN
lookups
VLAN Add improvement (patch 02):
Operation VLANs Global ms before/after Change % Per-VLAN ms before/after Change %
------------------------------------------------------------------------------------------
add 1 0.0519 / 0.0900 +73.52 0.0481 / 0.0895 +86.16 add 64 2.2500 / 0.7190 -68.04 2.2726 / 0.7441 -67.26 add 1024 32.7464 / 5.7028 -82.58 32.9841 / 6.3116 -80.86 add 4094 149.6750 / 34.3223 -77.07 151.5808 / 35.4586 -76.61
Single vlan add is slower, but vlan group add is 67-80% faster. Vlan del is pretty much the same.
VLAN forwarding improvement (patch 03):
VLANs Listeners Mpps before Mpps after Gain % Cycles before Cycles after Saved %
---------------------------------------------------------------------------------------
8 4 0.785571 0.865156 +10.13 3771.2 3381.2 10.34
8 8 0.454257 0.511490 +12.60 6900.5 6091.0 11.73
8 16 0.249896 0.288575 +15.48 13144.0 11362.9 13.55
64 4 0.765468 0.841916 +9.99 3881.6 3462.1 10.81
64 8 0.437448 0.501744 +14.70 7153.6 6215.6 13.11
64 16 0.238901 0.279188 +16.86 13690.2 11674.2 14.73
4094 4 0.583447 0.695246 +19.16 5271.6 4339.3 17.68
4094 8 0.293712 0.373710 +27.24 11001.0 8492.8 22.80
4094 16 0.140026 0.191269 +36.60 23509.6 17213.7 26.78Medians of 6 runs, 64-byte frames, one group per VLAN, and packet VIDs chosen at random. Cycles are PMU cycles / input packet on the fwding CPU.
Thanks,
Nik
Nikolay Aleksandrov (3):
net: bridge: avoid VLAN lookups for multicast router forwarding
net: bridge: mdb: index port groups by VLAN
net: bridge: mdb: avoid VLAN lookups in listener forwarding
net/bridge/br_forward.c | 21 +++++++++++++-------- net/bridge/br_multicast.c | 31 ++++++++++++++++++++++++++++++- net/bridge/br_private.h | 30 ++++++++++++++++-------------- net/bridge/br_vlan.c | 2 ++ 4 files changed, 61 insertions(+), 23 deletions(-)
Signature · 1 line
2.47.3