@@ -249,7 +249,7 @@ VLAN will be subscribed to host port and the respective slave ports.
249249
250250 < or >
251251
252- vconfig rem eth0 5
252+ vconfig rem eth0. 5
253253
254254 **IP assigning **
255255
@@ -417,7 +417,7 @@ To allow Dual Emac interfaces to be added to the Linux Bridge one of following c
417417Dual EMAC can be enabled with adding the entry dual\_ emac to the cpsw
418418device tree node as the reference patch below
419419
420- .. code :: dts
420+ .. code :: diff
421421
422422 diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
423423 index ac1f759..b50e9ef 100644
@@ -571,6 +571,59 @@ Userspace binary formats --->
571571
572572|
573573
574+ .. rubric :: Multi port Switch mode
575+ :name: multi-port-switch-mode
576+
577+ .. note ::
578+
579+ This section documents the Switch mode features available with
580+ CPSW.
581+
582+ The Switch mode can be enabled by configuring devlink driver parameter
583+ "switch_mode" to true
584+
585+ .. code-block :: console
586+
587+ devlink dev param set platform/48484000.switch name switch_mode value true cmode runtime
588+
589+ Above setting can be done regardless of the state of Port's netdev
590+ devices - UP/DOWN, but Port's netdev devices have to be in UP state
591+ before joining the bridge. This is to avoid overwriting of bridge
592+ configuration as CPSW switch driver completely reloads its configuration
593+ when first port changes its state to UP.
594+
595+ When all the interfaces have joined the bridge - CPSW switch driver will
596+ enable marking packets with offload_fwd_mark flag.
597+
598+ All configuration is implemented via switchdev API.
599+
600+ .. rubric :: Bridge Setup
601+ :name: bridge-setup
602+
603+ .. code-block :: console
604+
605+ devlink dev param set platform/48484000.switch name switch_mode value true cmode runtime
606+
607+ ip link add name br0 type bridge
608+ ip link set dev br0 type bridge ageing_time 1000
609+ ip link set dev eth0 up
610+ ip link set dev eth1 up
611+ ip link set dev eth0 master br0
612+ ip link set dev eth1 master br0
613+
614+ [*] bridge vlan add dev br0 vid 1 self
615+ [*] bridge vlan add dev br0 vid 1 pvid untagged self
616+ [*] if vlan_filtering=1, where default_pvid=1
617+
618+ Note: Steps [*] are mandatory.
619+
620+ .. rubric :: Turn On/Off Spanning Tree Protocol (STP)
621+ :name: turn-on/off-spanning-tree-protocol
622+
623+ .. code-block :: console
624+
625+ ip link set dev br0 type bridge stp_state 1/0
626+
574627 .. rubric :: Switch Config Commands
575628 :name: switch-config-commands
576629
0 commit comments