@@ -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,62 @@ Userspace binary formats --->
571571
572572|
573573
574+ .. rubric :: Multi port Switch mode
575+ :name: multi-port-switch-mode
576+
577+ .. note ::
578+
579+ The following section documents the Switch mode features available with
580+ CPSW.
581+
582+ To enable Switch mode, configure the 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+ You can apply this configuration regardless of the state of the port's
590+ associated netdev devices. The port's associated netdev devices have to
591+ be in the **up ** state before joining the bridge. This is to avoid
592+ overwriting the bridge configuration as CPSW switch driver completely
593+ reloads when the first port changes its state to **up **.
594+
595+ When all interfaces have joined the bridge, the CPSW switch driver will
596+ begin marking packets with the ``offload_fwd_mark `` flag.
597+
598+ The switchdev APIs provided by the CPSW driver code will configure
599+ the switch device.
600+
601+ .. rubric :: Bridge Setup
602+ :name: bridge-setup
603+
604+ .. code-block :: console
605+
606+ devlink dev param set platform/48484000.switch name switch_mode value true cmode runtime
607+
608+ ip link add name br0 type bridge
609+ ip link set dev br0 type bridge ageing_time 1000
610+ ip link set dev eth0 up
611+ ip link set dev eth1 up
612+ ip link set dev eth0 master br0
613+ ip link set dev eth1 master br0
614+
615+ You must run the following commands if you enable VLAN
616+ filtering on the bridge (vlan_filtering=1) with default_pvid=1.
617+
618+ .. code-block :: console
619+
620+ bridge vlan add dev br0 vid 1 self
621+ bridge vlan add dev br0 vid 1 pvid untagged self
622+
623+ .. rubric :: Turn On or Off Spanning Tree Protocol (STP)
624+ :name: turn-on-or-off-spanning-tree-protocol
625+
626+ .. code-block :: console
627+
628+ ip link set dev br0 type bridge stp_state 1/0
629+
574630 .. rubric :: Switch Config Commands
575631 :name: switch-config-commands
576632
0 commit comments