@@ -249,7 +249,7 @@ VLAN will be subscribed to host port and the respective slave ports.
249
249
250
250
< or >
251
251
252
- vconfig rem eth0 5
252
+ vconfig rem eth0. 5
253
253
254
254
**IP assigning **
255
255
@@ -417,7 +417,7 @@ To allow Dual Emac interfaces to be added to the Linux Bridge one of following c
417
417
Dual EMAC can be enabled with adding the entry dual\_ emac to the cpsw
418
418
device tree node as the reference patch below
419
419
420
- .. code :: dts
420
+ .. code :: diff
421
421
422
422
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
423
423
index ac1f759..b50e9ef 100644
@@ -571,6 +571,62 @@ Userspace binary formats --->
571
571
572
572
|
573
573
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 the above setting 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
+
574
630
.. rubric :: Switch Config Commands
575
631
:name: switch-config-commands
576
632
0 commit comments