Skip to content

Commit 6ca8063

Browse files
ffainellikuba-moo
authored andcommitted
net: dsa: Use conduit and user terms
Use more inclusive terms throughout the DSA subsystem by moving away from "master" which is replaced by "conduit" and "slave" which is replaced by "user". No functional changes. Acked-by: Rob Herring <robh@kernel.org> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20231023181729.1191071-2-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 00e984c commit 6ca8063

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1547
-1544
lines changed

Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ description: |
6060
6161
Check out example 6.
6262
63-
- Port 5 can be wired to an external phy. Port 5 becomes a DSA slave.
63+
- Port 5 can be wired to an external phy. Port 5 becomes a DSA user port.
6464
6565
For the multi-chip module MT7530, the external phy must be wired TX to TX
6666
to gmac1 of the SoC for this to work. Ubiquiti EdgeRouter X SFP is wired

Documentation/networking/dsa/b53.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ VLAN programming would basically change the CPU port's default PVID and make
5252
it untagged, undesirable.
5353

5454
In difference to the configuration described in :ref:`dsa-vlan-configuration`
55-
the default VLAN 1 has to be removed from the slave interface configuration in
55+
the default VLAN 1 has to be removed from the user interface configuration in
5656
single port and gateway configuration, while there is no need to add an extra
5757
VLAN configuration in the bridge showcase.
5858

@@ -68,13 +68,13 @@ By default packages are tagged with vid 1:
6868
ip link add link eth0 name eth0.2 type vlan id 2
6969
ip link add link eth0 name eth0.3 type vlan id 3
7070
71-
# The master interface needs to be brought up before the slave ports.
71+
# The conduit interface needs to be brought up before the user ports.
7272
ip link set eth0 up
7373
ip link set eth0.1 up
7474
ip link set eth0.2 up
7575
ip link set eth0.3 up
7676
77-
# bring up the slave interfaces
77+
# bring up the user interfaces
7878
ip link set wan up
7979
ip link set lan1 up
8080
ip link set lan2 up
@@ -113,11 +113,11 @@ bridge
113113
# tag traffic on CPU port
114114
ip link add link eth0 name eth0.1 type vlan id 1
115115
116-
# The master interface needs to be brought up before the slave ports.
116+
# The conduit interface needs to be brought up before the user ports.
117117
ip link set eth0 up
118118
ip link set eth0.1 up
119119
120-
# bring up the slave interfaces
120+
# bring up the user interfaces
121121
ip link set wan up
122122
ip link set lan1 up
123123
ip link set lan2 up
@@ -149,12 +149,12 @@ gateway
149149
ip link add link eth0 name eth0.1 type vlan id 1
150150
ip link add link eth0 name eth0.2 type vlan id 2
151151
152-
# The master interface needs to be brought up before the slave ports.
152+
# The conduit interface needs to be brought up before the user ports.
153153
ip link set eth0 up
154154
ip link set eth0.1 up
155155
ip link set eth0.2 up
156156
157-
# bring up the slave interfaces
157+
# bring up the user interfaces
158158
ip link set wan up
159159
ip link set lan1 up
160160
ip link set lan2 up

Documentation/networking/dsa/bcm_sf2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ MDIO indirect accesses
6767
----------------------
6868

6969
Due to a limitation in how Broadcom switches have been designed, external
70-
Broadcom switches connected to a SF2 require the use of the DSA slave MDIO bus
70+
Broadcom switches connected to a SF2 require the use of the DSA user MDIO bus
7171
in order to properly configure them. By default, the SF2 pseudo-PHY address, and
7272
an external switch pseudo-PHY address will both be snooping for incoming MDIO
7373
transactions, since they are at the same address (30), resulting in some kind of

Documentation/networking/dsa/configuration.rst

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,38 @@ at https://www.kernel.org/pub/linux/utils/net/iproute2/
3131

3232
Through DSA every port of a switch is handled like a normal linux Ethernet
3333
interface. The CPU port is the switch port connected to an Ethernet MAC chip.
34-
The corresponding linux Ethernet interface is called the master interface.
35-
All other corresponding linux interfaces are called slave interfaces.
34+
The corresponding linux Ethernet interface is called the conduit interface.
35+
All other corresponding linux interfaces are called user interfaces.
3636

37-
The slave interfaces depend on the master interface being up in order for them
38-
to send or receive traffic. Prior to kernel v5.12, the state of the master
37+
The user interfaces depend on the conduit interface being up in order for them
38+
to send or receive traffic. Prior to kernel v5.12, the state of the conduit
3939
interface had to be managed explicitly by the user. Starting with kernel v5.12,
4040
the behavior is as follows:
4141

42-
- when a DSA slave interface is brought up, the master interface is
42+
- when a DSA user interface is brought up, the conduit interface is
4343
automatically brought up.
44-
- when the master interface is brought down, all DSA slave interfaces are
44+
- when the conduit interface is brought down, all DSA user interfaces are
4545
automatically brought down.
4646

4747
In this documentation the following Ethernet interfaces are used:
4848

4949
*eth0*
50-
the master interface
50+
the conduit interface
5151

5252
*eth1*
53-
another master interface
53+
another conduit interface
5454

5555
*lan1*
56-
a slave interface
56+
a user interface
5757

5858
*lan2*
59-
another slave interface
59+
another user interface
6060

6161
*lan3*
62-
a third slave interface
62+
a third user interface
6363

6464
*wan*
65-
A slave interface dedicated for upstream traffic
65+
A user interface dedicated for upstream traffic
6666

6767
Further Ethernet interfaces can be configured similar.
6868
The configured IPs and networks are:
@@ -96,23 +96,23 @@ without using a VLAN based configuration.
9696
ip addr add 192.0.2.5/30 dev lan2
9797
ip addr add 192.0.2.9/30 dev lan3
9898
99-
# For kernels earlier than v5.12, the master interface needs to be
100-
# brought up manually before the slave ports.
99+
# For kernels earlier than v5.12, the conduit interface needs to be
100+
# brought up manually before the user ports.
101101
ip link set eth0 up
102102
103-
# bring up the slave interfaces
103+
# bring up the user interfaces
104104
ip link set lan1 up
105105
ip link set lan2 up
106106
ip link set lan3 up
107107
108108
*bridge*
109109
.. code-block:: sh
110110
111-
# For kernels earlier than v5.12, the master interface needs to be
112-
# brought up manually before the slave ports.
111+
# For kernels earlier than v5.12, the conduit interface needs to be
112+
# brought up manually before the user ports.
113113
ip link set eth0 up
114114
115-
# bring up the slave interfaces
115+
# bring up the user interfaces
116116
ip link set lan1 up
117117
ip link set lan2 up
118118
ip link set lan3 up
@@ -134,11 +134,11 @@ without using a VLAN based configuration.
134134
*gateway*
135135
.. code-block:: sh
136136
137-
# For kernels earlier than v5.12, the master interface needs to be
138-
# brought up manually before the slave ports.
137+
# For kernels earlier than v5.12, the conduit interface needs to be
138+
# brought up manually before the user ports.
139139
ip link set eth0 up
140140
141-
# bring up the slave interfaces
141+
# bring up the user interfaces
142142
ip link set wan up
143143
ip link set lan1 up
144144
ip link set lan2 up
@@ -178,14 +178,14 @@ configuration.
178178
ip link add link eth0 name eth0.2 type vlan id 2
179179
ip link add link eth0 name eth0.3 type vlan id 3
180180
181-
# For kernels earlier than v5.12, the master interface needs to be
182-
# brought up manually before the slave ports.
181+
# For kernels earlier than v5.12, the conduit interface needs to be
182+
# brought up manually before the user ports.
183183
ip link set eth0 up
184184
ip link set eth0.1 up
185185
ip link set eth0.2 up
186186
ip link set eth0.3 up
187187
188-
# bring up the slave interfaces
188+
# bring up the user interfaces
189189
ip link set lan1 up
190190
ip link set lan2 up
191191
ip link set lan3 up
@@ -221,12 +221,12 @@ configuration.
221221
# tag traffic on CPU port
222222
ip link add link eth0 name eth0.1 type vlan id 1
223223
224-
# For kernels earlier than v5.12, the master interface needs to be
225-
# brought up manually before the slave ports.
224+
# For kernels earlier than v5.12, the conduit interface needs to be
225+
# brought up manually before the user ports.
226226
ip link set eth0 up
227227
ip link set eth0.1 up
228228
229-
# bring up the slave interfaces
229+
# bring up the user interfaces
230230
ip link set lan1 up
231231
ip link set lan2 up
232232
ip link set lan3 up
@@ -261,13 +261,13 @@ configuration.
261261
ip link add link eth0 name eth0.1 type vlan id 1
262262
ip link add link eth0 name eth0.2 type vlan id 2
263263
264-
# For kernels earlier than v5.12, the master interface needs to be
265-
# brought up manually before the slave ports.
264+
# For kernels earlier than v5.12, the conduit interface needs to be
265+
# brought up manually before the user ports.
266266
ip link set eth0 up
267267
ip link set eth0.1 up
268268
ip link set eth0.2 up
269269
270-
# bring up the slave interfaces
270+
# bring up the user interfaces
271271
ip link set wan up
272272
ip link set lan1 up
273273
ip link set lan2 up
@@ -380,30 +380,30 @@ affinities according to the available CPU ports.
380380

381381
Secondly, it is possible to perform load balancing between CPU ports on a per
382382
packet basis, rather than statically assigning user ports to CPU ports.
383-
This can be achieved by placing the DSA masters under a LAG interface (bonding
383+
This can be achieved by placing the DSA conduits under a LAG interface (bonding
384384
or team). DSA monitors this operation and creates a mirror of this software LAG
385-
on the CPU ports facing the physical DSA masters that constitute the LAG slave
385+
on the CPU ports facing the physical DSA conduits that constitute the LAG slave
386386
devices.
387387

388388
To make use of multiple CPU ports, the firmware (device tree) description of
389-
the switch must mark all the links between CPU ports and their DSA masters
389+
the switch must mark all the links between CPU ports and their DSA conduits
390390
using the ``ethernet`` reference/phandle. At startup, only a single CPU port
391-
and DSA master will be used - the numerically first port from the firmware
391+
and DSA conduit will be used - the numerically first port from the firmware
392392
description which has an ``ethernet`` property. It is up to the user to
393-
configure the system for the switch to use other masters.
393+
configure the system for the switch to use other conduits.
394394

395395
DSA uses the ``rtnl_link_ops`` mechanism (with a "dsa" ``kind``) to allow
396-
changing the DSA master of a user port. The ``IFLA_DSA_MASTER`` u32 netlink
397-
attribute contains the ifindex of the master device that handles each slave
398-
device. The DSA master must be a valid candidate based on firmware node
396+
changing the DSA conduit of a user port. The ``IFLA_DSA_MASTER`` u32 netlink
397+
attribute contains the ifindex of the conduit device that handles each user
398+
device. The DSA conduit must be a valid candidate based on firmware node
399399
information, or a LAG interface which contains only slaves which are valid
400400
candidates.
401401

402402
Using iproute2, the following manipulations are possible:
403403

404404
.. code-block:: sh
405405
406-
# See the DSA master in current use
406+
# See the DSA conduit in current use
407407
ip -d link show dev swp0
408408
(...)
409409
dsa master eth0
@@ -414,7 +414,7 @@ Using iproute2, the following manipulations are possible:
414414
ip link set swp2 type dsa master eth1
415415
ip link set swp3 type dsa master eth0
416416
417-
# CPU ports in LAG, using explicit assignment of the DSA master
417+
# CPU ports in LAG, using explicit assignment of the DSA conduit
418418
ip link add bond0 type bond mode balance-xor && ip link set bond0 up
419419
ip link set eth1 down && ip link set eth1 master bond0
420420
ip link set swp0 type dsa master bond0
@@ -426,7 +426,7 @@ Using iproute2, the following manipulations are possible:
426426
(...)
427427
dsa master bond0
428428
429-
# CPU ports in LAG, relying on implicit migration of the DSA master
429+
# CPU ports in LAG, relying on implicit migration of the DSA conduit
430430
ip link add bond0 type bond mode balance-xor && ip link set bond0 up
431431
ip link set eth0 down && ip link set eth0 master bond0
432432
ip link set eth1 down && ip link set eth1 master bond0
@@ -436,23 +436,23 @@ Using iproute2, the following manipulations are possible:
436436
437437
Notice that in the case of CPU ports under a LAG, the use of the
438438
``IFLA_DSA_MASTER`` netlink attribute is not strictly needed, but rather, DSA
439-
reacts to the ``IFLA_MASTER`` attribute change of its present master (``eth0``)
439+
reacts to the ``IFLA_MASTER`` attribute change of its present conduit (``eth0``)
440440
and migrates all user ports to the new upper of ``eth0``, ``bond0``. Similarly,
441441
when ``bond0`` is destroyed using ``RTM_DELLINK``, DSA migrates the user ports
442-
that were assigned to this interface to the first physical DSA master which is
442+
that were assigned to this interface to the first physical DSA conduit which is
443443
eligible, based on the firmware description (it effectively reverts to the
444444
startup configuration).
445445

446446
In a setup with more than 2 physical CPU ports, it is therefore possible to mix
447-
static user to CPU port assignment with LAG between DSA masters. It is not
448-
possible to statically assign a user port towards a DSA master that has any
449-
upper interfaces (this includes LAG devices - the master must always be the LAG
447+
static user to CPU port assignment with LAG between DSA conduits. It is not
448+
possible to statically assign a user port towards a DSA conduit that has any
449+
upper interfaces (this includes LAG devices - the conduit must always be the LAG
450450
in this case).
451451

452-
Live changing of the DSA master (and thus CPU port) affinity of a user port is
452+
Live changing of the DSA conduit (and thus CPU port) affinity of a user port is
453453
permitted, in order to allow dynamic redistribution in response to traffic.
454454

455-
Physical DSA masters are allowed to join and leave at any time a LAG interface
456-
used as a DSA master; however, DSA will reject a LAG interface as a valid
457-
candidate for being a DSA master unless it has at least one physical DSA master
455+
Physical DSA conduits are allowed to join and leave at any time a LAG interface
456+
used as a DSA conduit; however, DSA will reject a LAG interface as a valid
457+
candidate for being a DSA conduit unless it has at least one physical DSA conduit
458458
as a slave device.

0 commit comments

Comments
 (0)