Commit 6ef4f409 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-doc-fixups'



Vladimir Oltean says:

====================
DSA/switchdev documentation fixups

These are some small fixups after the recently merged documentation
update.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f1656942 0929ff71
Loading
Loading
Loading
Loading
+166 −164
Original line number Diff line number Diff line
@@ -34,8 +34,15 @@ interface. The CPU port is the switch port connected to an Ethernet MAC chip.
The corresponding linux Ethernet interface is called the master interface.
All other corresponding linux interfaces are called slave interfaces.

The slave interfaces depend on the master interface. They can only brought up,
when the master interface is up.
The slave interfaces depend on the master interface being up in order for them
to send or receive traffic. Prior to kernel v5.12, the state of the master
interface had to be managed explicitly by the user. Starting with kernel v5.12,
the behavior is as follows:

- when a DSA slave interface is brought up, the master interface is
  automatically brought up.
- when the master interface is brought down, all DSA slave interfaces are
  automatically brought down.

In this documentation the following Ethernet interfaces are used:

@@ -78,9 +85,7 @@ The tagging based configuration is desired and supported by the majority of
DSA switches. These switches are capable to tag incoming and outgoing traffic
without using a VLAN based configuration.

single port
~~~~~~~~~~~

*single port*
  .. code-block:: sh

    # configure each interface
@@ -88,7 +93,8 @@ single port
    ip addr add 192.0.2.5/30 dev lan2
    ip addr add 192.0.2.9/30 dev lan3

  # The master interface needs to be brought up before the slave ports.
    # For kernels earlier than v5.12, the master interface needs to be
    # brought up manually before the slave ports.
    ip link set eth0 up

    # bring up the slave interfaces
@@ -96,12 +102,11 @@ single port
    ip link set lan2 up
    ip link set lan3 up

bridge
~~~~~~

*bridge*
  .. code-block:: sh

  # The master interface needs to be brought up before the slave ports.
    # For kernels earlier than v5.12, the master interface needs to be
    # brought up manually before the slave ports.
    ip link set eth0 up

    # bring up the slave interfaces
@@ -123,12 +128,11 @@ bridge
    # bring up the bridge
    ip link set dev br0 up

gateway
~~~~~~~

*gateway*
  .. code-block:: sh

  # The master interface needs to be brought up before the slave ports.
    # For kernels earlier than v5.12, the master interface needs to be
    # brought up manually before the slave ports.
    ip link set eth0 up

    # bring up the slave interfaces
@@ -161,8 +165,7 @@ A minority of switches are not capable to use a taging protocol
(DSA_TAG_PROTO_NONE). These switches can be configured by a VLAN based
configuration.

single port
~~~~~~~~~~~
*single port*
  The configuration can only be set up via VLAN tagging and bridge setup.

  .. code-block:: sh
@@ -172,7 +175,8 @@ The configuration can only be set up via VLAN tagging and bridge setup.
    ip link add link eth0 name eth0.2 type vlan id 2
    ip link add link eth0 name eth0.3 type vlan id 3

  # The master interface needs to be brought up before the slave ports.
    # For kernels earlier than v5.12, the master interface needs to be
    # brought up manually before the slave ports.
    ip link set eth0 up
    ip link set eth0.1 up
    ip link set eth0.2 up
@@ -208,15 +212,14 @@ The configuration can only be set up via VLAN tagging and bridge setup.
    ip link set br0 up


bridge
~~~~~~

*bridge*
  .. code-block:: sh

    # tag traffic on CPU port
    ip link add link eth0 name eth0.1 type vlan id 1

  # The master interface needs to be brought up before the slave ports.
    # For kernels earlier than v5.12, the master interface needs to be
    # brought up manually before the slave ports.
    ip link set eth0 up
    ip link set eth0.1 up

@@ -248,16 +251,15 @@ bridge
    # bring up the bridge
    ip link set dev br0 up

gateway
~~~~~~~

*gateway*
  .. code-block:: sh

    # tag traffic on CPU port
    ip link add link eth0 name eth0.1 type vlan id 1
    ip link add link eth0 name eth0.2 type vlan id 2

  # The master interface needs to be brought up before the slave ports.
    # For kernels earlier than v5.12, the master interface needs to be
    # brought up manually before the slave ports.
    ip link set eth0 up
    ip link set eth0.1 up
    ip link set eth0.2 up
+1 −0
Original line number Diff line number Diff line
@@ -464,6 +464,7 @@ For each devlink device, every physical port (i.e. user ports, CPU ports, DSA
links or unused ports) is exposed as a devlink port.

DSA drivers can make use of the following devlink features:

- Regions: debugging feature which allows user space to dump driver-defined
  areas of hardware information in a low-level, binary format. Both global
  regions as well as per-port regions are supported. It is possible to export
+2 −1
Original line number Diff line number Diff line
@@ -479,6 +479,7 @@ is not possible.
  be added to a second bridge, which includes other switch ports or software
  interfaces. Some approaches to ensure that the forwarding domain for traffic
  belonging to the VLAN upper interfaces are managed properly:

    * If forwarding destinations can be managed per VLAN, the hardware could be
      configured to map all traffic, except the packets tagged with a VID
      belonging to a VLAN upper interface, to an internal VID corresponding to
@@ -522,7 +523,7 @@ as untagged packets, since the bridge device does not allow the manipulation of
VID 0 in its database.

When the bridge has VLAN filtering enabled and a PVID is not configured on the
ingress port, untagged 802.1p tagged packets must be dropped. When the bridge
ingress port, untagged and 802.1p tagged packets must be dropped. When the bridge
has VLAN filtering enabled and a PVID exists on the ingress port, untagged and
priority-tagged packets must be accepted and forwarded according to the
bridge's port membership of the PVID VLAN. When the bridge has VLAN filtering