1 .. SPDX-License-Identifier: GPL-2.0 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 ========================================== 3 ========================================== 4 Broadcom RoboSwitch Ethernet switch driver 4 Broadcom RoboSwitch Ethernet switch driver 5 ========================================== 5 ========================================== 6 6 7 The Broadcom RoboSwitch Ethernet switch family 7 The Broadcom RoboSwitch Ethernet switch family is used in quite a range of 8 xDSL router, cable modems and other multimedia 8 xDSL router, cable modems and other multimedia devices. 9 9 10 The actual implementation supports the devices 10 The actual implementation supports the devices BCM5325E, BCM5365, BCM539x, 11 BCM53115 and BCM53125 as well as BCM63XX. 11 BCM53115 and BCM53125 as well as BCM63XX. 12 12 13 Implementation details 13 Implementation details 14 ====================== 14 ====================== 15 15 16 The driver is located in ``drivers/net/dsa/b53 16 The driver is located in ``drivers/net/dsa/b53/`` and is implemented as a 17 DSA driver; see ``Documentation/networking/dsa 17 DSA driver; see ``Documentation/networking/dsa/dsa.rst`` for details on the 18 subsystem and what it provides. 18 subsystem and what it provides. 19 19 20 The switch is, if possible, configured to enab 20 The switch is, if possible, configured to enable a Broadcom specific 4-bytes 21 switch tag which gets inserted by the switch f 21 switch tag which gets inserted by the switch for every packet forwarded to the 22 CPU interface, conversely, the CPU network int 22 CPU interface, conversely, the CPU network interface should insert a similar 23 tag for packets entering the CPU port. The tag 23 tag for packets entering the CPU port. The tag format is described in 24 ``net/dsa/tag_brcm.c``. 24 ``net/dsa/tag_brcm.c``. 25 25 26 The configuration of the device depends on whe 26 The configuration of the device depends on whether or not tagging is 27 supported. 27 supported. 28 28 29 The interface names and example network config 29 The interface names and example network configuration are used according the 30 configuration described in the :ref:`dsa-confi 30 configuration described in the :ref:`dsa-config-showcases`. 31 31 32 Configuration with tagging support 32 Configuration with tagging support 33 ---------------------------------- 33 ---------------------------------- 34 34 35 The tagging based configuration is desired. It 35 The tagging based configuration is desired. It is not specific to the b53 36 DSA driver and will work like all DSA drivers 36 DSA driver and will work like all DSA drivers which supports tagging. 37 37 38 See :ref:`dsa-tagged-configuration`. 38 See :ref:`dsa-tagged-configuration`. 39 39 40 Configuration without tagging support 40 Configuration without tagging support 41 ------------------------------------- 41 ------------------------------------- 42 42 43 Older models (5325, 5365) support a different 43 Older models (5325, 5365) support a different tag format that is not supported 44 yet. 539x and 531x5 require managed mode and s 44 yet. 539x and 531x5 require managed mode and some special handling, which is 45 also not yet supported. The tagging support is 45 also not yet supported. The tagging support is disabled in these cases and the 46 switch need a different configuration. 46 switch need a different configuration. 47 47 48 The configuration slightly differ from the :re 48 The configuration slightly differ from the :ref:`dsa-vlan-configuration`. 49 49 50 The b53 tags the CPU port in all VLANs, since 50 The b53 tags the CPU port in all VLANs, since otherwise any PVID untagged 51 VLAN programming would basically change the CP 51 VLAN programming would basically change the CPU port's default PVID and make 52 it untagged, undesirable. 52 it untagged, undesirable. 53 53 54 In difference to the configuration described i 54 In difference to the configuration described in :ref:`dsa-vlan-configuration` 55 the default VLAN 1 has to be removed from the 55 the default VLAN 1 has to be removed from the user interface configuration in 56 single port and gateway configuration, while t 56 single port and gateway configuration, while there is no need to add an extra 57 VLAN configuration in the bridge showcase. 57 VLAN configuration in the bridge showcase. 58 58 59 single port 59 single port 60 ~~~~~~~~~~~ 60 ~~~~~~~~~~~ 61 The configuration can only be set up via VLAN 61 The configuration can only be set up via VLAN tagging and bridge setup. 62 By default packages are tagged with vid 1: 62 By default packages are tagged with vid 1: 63 63 64 .. code-block:: sh 64 .. code-block:: sh 65 65 66 # tag traffic on CPU port 66 # tag traffic on CPU port 67 ip link add link eth0 name eth0.1 type vlan 67 ip link add link eth0 name eth0.1 type vlan id 1 68 ip link add link eth0 name eth0.2 type vlan 68 ip link add link eth0 name eth0.2 type vlan id 2 69 ip link add link eth0 name eth0.3 type vlan 69 ip link add link eth0 name eth0.3 type vlan id 3 70 70 71 # The conduit interface needs to be brought 71 # The conduit interface needs to be brought up before the user ports. 72 ip link set eth0 up 72 ip link set eth0 up 73 ip link set eth0.1 up 73 ip link set eth0.1 up 74 ip link set eth0.2 up 74 ip link set eth0.2 up 75 ip link set eth0.3 up 75 ip link set eth0.3 up 76 76 77 # bring up the user interfaces 77 # bring up the user interfaces 78 ip link set wan up 78 ip link set wan up 79 ip link set lan1 up 79 ip link set lan1 up 80 ip link set lan2 up 80 ip link set lan2 up 81 81 82 # create bridge 82 # create bridge 83 ip link add name br0 type bridge 83 ip link add name br0 type bridge 84 84 85 # activate VLAN filtering 85 # activate VLAN filtering 86 ip link set dev br0 type bridge vlan_filteri 86 ip link set dev br0 type bridge vlan_filtering 1 87 87 88 # add ports to bridges 88 # add ports to bridges 89 ip link set dev wan master br0 89 ip link set dev wan master br0 90 ip link set dev lan1 master br0 90 ip link set dev lan1 master br0 91 ip link set dev lan2 master br0 91 ip link set dev lan2 master br0 92 92 93 # tag traffic on ports 93 # tag traffic on ports 94 bridge vlan add dev lan1 vid 2 pvid untagged 94 bridge vlan add dev lan1 vid 2 pvid untagged 95 bridge vlan del dev lan1 vid 1 95 bridge vlan del dev lan1 vid 1 96 bridge vlan add dev lan2 vid 3 pvid untagged 96 bridge vlan add dev lan2 vid 3 pvid untagged 97 bridge vlan del dev lan2 vid 1 97 bridge vlan del dev lan2 vid 1 98 98 99 # configure the VLANs 99 # configure the VLANs 100 ip addr add 192.0.2.1/30 dev eth0.1 100 ip addr add 192.0.2.1/30 dev eth0.1 101 ip addr add 192.0.2.5/30 dev eth0.2 101 ip addr add 192.0.2.5/30 dev eth0.2 102 ip addr add 192.0.2.9/30 dev eth0.3 102 ip addr add 192.0.2.9/30 dev eth0.3 103 103 104 # bring up the bridge devices 104 # bring up the bridge devices 105 ip link set br0 up 105 ip link set br0 up 106 106 107 107 108 bridge 108 bridge 109 ~~~~~~ 109 ~~~~~~ 110 110 111 .. code-block:: sh 111 .. code-block:: sh 112 112 113 # tag traffic on CPU port 113 # tag traffic on CPU port 114 ip link add link eth0 name eth0.1 type vlan 114 ip link add link eth0 name eth0.1 type vlan id 1 115 115 116 # The conduit interface needs to be brought 116 # The conduit interface needs to be brought up before the user ports. 117 ip link set eth0 up 117 ip link set eth0 up 118 ip link set eth0.1 up 118 ip link set eth0.1 up 119 119 120 # bring up the user interfaces 120 # bring up the user interfaces 121 ip link set wan up 121 ip link set wan up 122 ip link set lan1 up 122 ip link set lan1 up 123 ip link set lan2 up 123 ip link set lan2 up 124 124 125 # create bridge 125 # create bridge 126 ip link add name br0 type bridge 126 ip link add name br0 type bridge 127 127 128 # activate VLAN filtering 128 # activate VLAN filtering 129 ip link set dev br0 type bridge vlan_filteri 129 ip link set dev br0 type bridge vlan_filtering 1 130 130 131 # add ports to bridge 131 # add ports to bridge 132 ip link set dev wan master br0 132 ip link set dev wan master br0 133 ip link set dev lan1 master br0 133 ip link set dev lan1 master br0 134 ip link set dev lan2 master br0 134 ip link set dev lan2 master br0 135 ip link set eth0.1 master br0 135 ip link set eth0.1 master br0 136 136 137 # configure the bridge 137 # configure the bridge 138 ip addr add 192.0.2.129/25 dev br0 138 ip addr add 192.0.2.129/25 dev br0 139 139 140 # bring up the bridge 140 # bring up the bridge 141 ip link set dev br0 up 141 ip link set dev br0 up 142 142 143 gateway 143 gateway 144 ~~~~~~~ 144 ~~~~~~~ 145 145 146 .. code-block:: sh 146 .. code-block:: sh 147 147 148 # tag traffic on CPU port 148 # tag traffic on CPU port 149 ip link add link eth0 name eth0.1 type vlan 149 ip link add link eth0 name eth0.1 type vlan id 1 150 ip link add link eth0 name eth0.2 type vlan 150 ip link add link eth0 name eth0.2 type vlan id 2 151 151 152 # The conduit interface needs to be brought 152 # The conduit interface needs to be brought up before the user ports. 153 ip link set eth0 up 153 ip link set eth0 up 154 ip link set eth0.1 up 154 ip link set eth0.1 up 155 ip link set eth0.2 up 155 ip link set eth0.2 up 156 156 157 # bring up the user interfaces 157 # bring up the user interfaces 158 ip link set wan up 158 ip link set wan up 159 ip link set lan1 up 159 ip link set lan1 up 160 ip link set lan2 up 160 ip link set lan2 up 161 161 162 # create bridge 162 # create bridge 163 ip link add name br0 type bridge 163 ip link add name br0 type bridge 164 164 165 # activate VLAN filtering 165 # activate VLAN filtering 166 ip link set dev br0 type bridge vlan_filteri 166 ip link set dev br0 type bridge vlan_filtering 1 167 167 168 # add ports to bridges 168 # add ports to bridges 169 ip link set dev wan master br0 169 ip link set dev wan master br0 170 ip link set eth0.1 master br0 170 ip link set eth0.1 master br0 171 ip link set dev lan1 master br0 171 ip link set dev lan1 master br0 172 ip link set dev lan2 master br0 172 ip link set dev lan2 master br0 173 173 174 # tag traffic on ports 174 # tag traffic on ports 175 bridge vlan add dev wan vid 2 pvid untagged 175 bridge vlan add dev wan vid 2 pvid untagged 176 bridge vlan del dev wan vid 1 176 bridge vlan del dev wan vid 1 177 177 178 # configure the VLANs 178 # configure the VLANs 179 ip addr add 192.0.2.1/30 dev eth0.2 179 ip addr add 192.0.2.1/30 dev eth0.2 180 ip addr add 192.0.2.129/25 dev br0 180 ip addr add 192.0.2.129/25 dev br0 181 181 182 # bring up the bridge devices 182 # bring up the bridge devices 183 ip link set br0 up 183 ip link set br0 up
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.