~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/networking/dsa/b53.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php