From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v1 2/3] Documentation: networking: Add DSA switch support documentation
Date: Wed, 12 Mar 2025 12:20:56 +0100 [thread overview]
Message-ID: <20250312112057.570001-2-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20250312112057.570001-1-o.rempel@pengutronix.de>
Add documentation for Distributed Switch Architecture (DSA) support in
Barebox. It introduces the `forwarding` parameter, which allows
configuring a DSA switch to operate in either isolated mode (default) or
forwarding mode.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
Documentation/user/networking.rst | 74 +++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/Documentation/user/networking.rst b/Documentation/user/networking.rst
index 2306cb6a60d1..71703f064bee 100644
--- a/Documentation/user/networking.rst
+++ b/Documentation/user/networking.rst
@@ -186,3 +186,77 @@ barebox:
The netconsole can be used just like any other console. Note, however, that the
simple console protocol is UDP based, so there is no guarantee about packet
loss.
+
+DSA (Distributed Switch Architecture) Support in Barebox
+--------------------------------------------------------
+
+Barebox includes support for DSA (Distributed Switch Architecture), allowing
+for basic configuration and management of network switches within the
+bootloader.
+
+DSA enables network devices to use a switch framework where each port of the
+switch is treated as a separate network interface, while still allowing packet
+forwarding between ports when enabled.
+
+DSA Configuration
+^^^^^^^^^^^^^^^^^
+
+DSA switches are managed through device parameters, similar to network
+interfaces. Each switch is identified as a separate device, typically named
+``switch0`` or ``switch@00`` depending on the bus address.
+
+Global Forwarding Control
+"""""""""""""""""""""""""
+
+A parameter, ``forwarding``, allows configuring whether a switch operates
+in **isolated mode** (default) or **forwarding mode**:
+
+- **Isolated Mode** (default): Each port is treated as an independent interface,
+ with no forwarding between ports.
+
+- **Forwarding Mode**: The switch allows forwarding of packets between ports,
+ acting as a traditional non-managed switch.
+
+To check the current DSA switch settings, use:
+
+.. code-block:: sh
+
+ barebox:/ devinfo switch0
+ Parameters:
+ forwarding: 0 (type: bool)
+
+To enable forwarding mode:
+
+.. code-block:: sh
+
+ dev.switch0.forwarding=1
+
+To disable forwarding and revert to isolated mode:
+
+.. code-block:: sh
+
+ dev.switch0.forwarding=0
+
+Persisting Configuration
+""""""""""""""""""""""""
+
+To ensure that the forwarding mode setting persists across reboots,
+it can be stored as a nonvolatile (nv) variable:
+
+.. code-block:: sh
+
+ nv dev.switch0.forwarding=1
+
+This will configure the switch to always boot in forwarding mode.
+
+Integration with Network Interfaces
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Each port of the DSA switch is exposed as an independent network interface in
+Barebox. However, when forwarding is enabled, packets can be forwarded between
+these interfaces without requiring intervention from the CPU.
+
+To configure network settings for individual ports, use standard network
+configuration variables (e.g., ``eth0.ipaddr``, ``eth0.mode``, etc.). These
+settings are applied per port and are independent of the global switch
+forwarding configuration.
--
2.39.5
next prev parent reply other threads:[~2025-03-12 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 11:20 [PATCH v1 1/3] net: dsa: Add global forwarding mode support Oleksij Rempel
2025-03-12 11:20 ` Oleksij Rempel [this message]
2025-03-12 11:20 ` [PATCH v1 3/3] net: dsa: sja1105: Add support for global forwarding mode Oleksij Rempel
2025-03-14 16:13 ` [PATCH v1 1/3] net: dsa: Add global forwarding mode support Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250312112057.570001-2-o.rempel@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox