Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@

< or >

vconfig rem eth0 5
vconfig rem eth0.5

**IP assigning**

Expand Down Expand Up @@ -417,7 +417,7 @@
Dual EMAC can be enabled with adding the entry dual\_emac to the cpsw
device tree node as the reference patch below

.. code:: dts
.. code:: diff

diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index ac1f759..b50e9ef 100644
Expand Down Expand Up @@ -571,6 +571,62 @@

|

.. rubric:: Multi port Switch mode
:name: multi-port-switch-mode

.. note::

The following section documents the Switch mode features available with
CPSW.

To enable Switch mode, configure the devlink driver parameter

Check warning on line 582 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'devlink'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'devlink'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst", "range": {"start": {"line": 582, "column": 38}}}, "severity": "WARNING"}
"switch_mode" to true

Check warning on line 583 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'switch_mode'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'switch_mode'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst", "range": {"start": {"line": 583, "column": 2}}}, "severity": "WARNING"}

.. code-block:: console

devlink dev param set platform/48484000.switch name switch_mode value true cmode runtime

You can apply this configuration regardless of the state of the port's
associated netdev devices. The port's associated netdev devices have to

Check warning on line 590 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'netdev'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'netdev'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst", "range": {"start": {"line": 590, "column": 50}}}, "severity": "WARNING"}

Check warning on line 590 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'netdev'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'netdev'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst", "range": {"start": {"line": 590, "column": 12}}}, "severity": "WARNING"}
be in the **up** state before joining the bridge. This is to avoid
overwriting the bridge configuration as CPSW switch driver completely
reloads when the first port changes its state to **up**.

When all interfaces have joined the bridge, the CPSW switch driver will
begin marking packets with the ``offload_fwd_mark`` flag.

The switchdev APIs provided by the CPSW driver code will configure

Check warning on line 598 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'switchdev'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'switchdev'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.rst", "range": {"start": {"line": 598, "column": 5}}}, "severity": "WARNING"}
the switch device.

.. rubric:: Bridge Setup
:name: bridge-setup

.. code-block:: console

devlink dev param set platform/48484000.switch name switch_mode value true cmode runtime

ip link add name br0 type bridge
ip link set dev br0 type bridge ageing_time 1000
ip link set dev eth0 up
ip link set dev eth1 up
ip link set dev eth0 master br0
ip link set dev eth1 master br0

You must run the following commands if you enable VLAN
filtering on the bridge (vlan_filtering=1) with default_pvid=1.

.. code-block:: console

bridge vlan add dev br0 vid 1 self
bridge vlan add dev br0 vid 1 pvid untagged self

.. rubric:: Turn On or Off Spanning Tree Protocol (STP)
:name: turn-on-or-off-spanning-tree-protocol

.. code-block:: console

ip link set dev br0 type bridge stp_state 1/0

.. rubric:: Switch Config Commands
:name: switch-config-commands

Expand Down