@@ -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,59 @@ 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 Port's netdev
590
+ devices - **up ** or **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
+ The usage of switchdev API implements all configuration.
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 or Off Spanning Tree Protocol (STP)
621
+ :name: turn-on-or-off-spanning-tree-protocol
622
+
623
+ .. code-block :: console
624
+
625
+ ip link set dev br0 type bridge stp_state 1/0
626
+
574
627
.. rubric :: Switch Config Commands
575
628
:name: switch-config-commands
576
629
0 commit comments