Page 1 of 1

What does HW-Offload mean when two switch chips on CCR2004?

Posted: Fri Oct 14, 2022 12:13 am
by FattyAcid
I have this config on my CCR2004-16G-2S+:

# jan/02/1970 12:51:37 by RouterOS 7.5
# software id = XXXXXXXXXX
#
# model = CCR2004-16G-2S+
# serial number = XXXXXXXXXX
/interface bridge
add name=bridge1 vlan-filtering=yes
/interface bridge port
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=ether1
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether2 pvid=20
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether12 pvid=60
/interface bridge vlan
add bridge=bridge1 tagged=ether1 vlan-ids=20
add bridge=bridge1 tagged=ether1 vlan-ids=60
/system identity
set name=test-gw1

Mikrotik docs say "Currently, CRS3xx, CRS5xx series switches, CCR2116, CCR2216 routers and RTL8367, 88E6393X, 88E6191X and MT7621 switch chips (since RouterOS v7) are capable of using bridge VLAN filtering and hardware offloading at the same time"

The CCR2004 has two Marvell-88E6191X:

[admin@test-gw1] /interface/ethernet/switch> print
Columns: NAME, TYPE, L3-HW-OFFLOADING
# NAME     TYPE              L3-HW-OFFLOADING
0 switch1  Marvell-88E6191X  no
1 switch2  Marvell-88E6191X  no

So with the above configuration, I see:

[admin@test-gw1] /interface/bridge/port> print
Flags: I - INACTIVE; H - HW-OFFLOAD
Columns: INTERFACE, BRIDGE, HW, PVID, PRIORITY, PATH-COST, INTERNAL-PATH-COST, HORIZON
#    INTERFACE  BRIDGE   HW   PVID  PRIORITY  PATH-COST  INTERNAL-PATH-COST  HORIZON
0 IH ether1     bridge1  yes     1  0x80             10                  10  none
1 IH ether2     bridge1  yes    20  0x80             10                  10  none
2 IH ether12    bridge1  yes    60  0x80             10                  10  none
[admin@test-gw1] /interface/bridge/port>

I am correct that despite it saying there is "H - HW-OFFLOAD" on all ports, it will not be using HW offloading when VLAN 60 traffic is going from ether1 (tagged) to ether12 (untagged) because that is spanning switch chips?

So the H flag only means you have the potentially for HW offloading within your same switch chip?

Re: What does HW-Offload mean when two switch chips on CCR2004?

Posted: Fri Oct 14, 2022 8:02 pm
by sirbryan
Short, generalized answer is "yes." With most MikroTik hardware, anytime a packet leaves one switch chip to go to another, it's doing it via the CPU.

With the RB2011/3011's, you could configure the switch VLANs independently via the Switch menu and not in the bridge, and leave the second switch out of the bridge entirely. Then you'd connect the second to the first (usually jumper ports 5-6) and get wirespeed switching across all ports. You could do the same on RB4011 and your CCR2004, but the CPU's are fast enough to handle at least one gigabit of bridging. There would be little advantage to hardwiring 1Gbps between them if the CPU can bridge 2Gbps or more.

On my CCR2004 with all SFP+ ports, I was able to bridge 7Gbps (maybe more) between two ports, and I can generate 5+Gbps of traffic with RB4011's and RB5009's (all quad-core CPU's). Therefore, I imagine with your CCR2004 that leaving both switches in the bridge would be more advantageous than connecting the two switches physically.

Re: What does HW-Offload mean when two switch chips on CCR2004?

Posted: Sun Oct 16, 2022 5:14 am
by chechito