Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Switch DSA to inclusive terminology
@ 2023-10-10 21:39 Florian Fainelli
  2023-10-10 21:39 ` [PATCH net-next 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT Florian Fainelli
       [not found] ` <20231010213942.3633407-2-florian.fainelli@broadcom.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Florian Fainelli @ 2023-10-10 21:39 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support, open list:DOCUMENTATION,
	open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER

[-- Attachment #1: Type: text/plain, Size: 4823 bytes --]

One of the action items following Netconf'23 is to switch subsystems to
use inclusive terminology. DSA has been making extensive use of the
"master" and "slave" words which are now replaced by "conduit" and
"user" respectively.

Florian Fainelli (2):
  net: dsa: Use conduit and user terms
  net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT

 .../bindings/net/dsa/mediatek,mt7530.yaml     |    2 +-
 Documentation/networking/dsa/b53.rst          |   14 +-
 Documentation/networking/dsa/bcm_sf2.rst      |    2 +-
 .../networking/dsa/configuration.rst          |  106 +-
 Documentation/networking/dsa/dsa.rst          |  150 +-
 Documentation/networking/dsa/lan9303.rst      |    2 +-
 Documentation/networking/dsa/sja1105.rst      |    8 +-
 .../dts/marvell/armada-3720-espressobin.dtsi  |    2 +-
 drivers/net/dsa/b53/b53_common.c              |    4 +-
 drivers/net/dsa/b53/b53_mdio.c                |    2 +-
 drivers/net/dsa/bcm_sf2.c                     |   36 +-
 drivers/net/dsa/bcm_sf2.h                     |    2 +-
 drivers/net/dsa/bcm_sf2_cfp.c                 |    4 +-
 drivers/net/dsa/lan9303-core.c                |    4 +-
 drivers/net/dsa/lantiq_gswip.c                |   34 +-
 drivers/net/dsa/microchip/ksz9477.c           |    6 +-
 drivers/net/dsa/microchip/ksz_common.c        |   20 +-
 drivers/net/dsa/microchip/ksz_ptp.c           |    2 +-
 drivers/net/dsa/mt7530.c                      |   16 +-
 drivers/net/dsa/mv88e6xxx/chip.c              |    2 +-
 drivers/net/dsa/ocelot/felix.c                |   62 +-
 drivers/net/dsa/ocelot/felix.h                |    4 +-
 drivers/net/dsa/qca/qca8k-8xxx.c              |   48 +-
 drivers/net/dsa/qca/qca8k-common.c            |    2 +-
 drivers/net/dsa/qca/qca8k-leds.c              |    6 +-
 drivers/net/dsa/qca/qca8k.h                   |    2 +-
 drivers/net/dsa/realtek/realtek-smi.c         |   28 +-
 drivers/net/dsa/realtek/realtek.h             |    2 +-
 drivers/net/dsa/sja1105/sja1105_main.c        |    4 +-
 drivers/net/dsa/xrs700x/xrs700x.c             |   12 +-
 drivers/net/ethernet/broadcom/bcmsysport.c    |    2 +-
 drivers/net/ethernet/mediatek/mtk_eth_soc.c   |    2 +-
 include/linux/dsa/sja1105.h                   |    2 +-
 include/net/dsa.h                             |   54 +-
 include/net/dsa_stubs.h                       |   10 +-
 include/uapi/linux/if_link.h                  |    3 +-
 net/core/dev_ioctl.c                          |    2 +-
 net/dsa/Makefile                              |    4 +-
 net/dsa/{master.c => conduit.c}               |   96 +-
 net/dsa/conduit.h                             |   22 +
 net/dsa/dsa.c                                 |  218 +--
 net/dsa/dsa.h                                 |   10 +-
 net/dsa/master.h                              |   22 -
 net/dsa/netlink.c                             |   22 +-
 net/dsa/port.c                                |  114 +-
 net/dsa/port.h                                |    2 +-
 net/dsa/slave.h                               |   69 -
 net/dsa/switch.c                              |   18 +-
 net/dsa/switch.h                              |    4 +-
 net/dsa/tag.c                                 |   10 +-
 net/dsa/tag.h                                 |   26 +-
 net/dsa/tag_8021q.c                           |   22 +-
 net/dsa/tag_8021q.h                           |    2 +-
 net/dsa/tag_ar9331.c                          |    4 +-
 net/dsa/tag_brcm.c                            |   14 +-
 net/dsa/tag_dsa.c                             |    6 +-
 net/dsa/tag_gswip.c                           |    4 +-
 net/dsa/tag_hellcreek.c                       |    4 +-
 net/dsa/tag_ksz.c                             |   12 +-
 net/dsa/tag_lan9303.c                         |    4 +-
 net/dsa/tag_mtk.c                             |    4 +-
 net/dsa/tag_none.c                            |    4 +-
 net/dsa/tag_ocelot.c                          |   22 +-
 net/dsa/tag_ocelot_8021q.c                    |   12 +-
 net/dsa/tag_qca.c                             |    6 +-
 net/dsa/tag_rtl4_a.c                          |    6 +-
 net/dsa/tag_rtl8_4.c                          |    6 +-
 net/dsa/tag_rzn1_a5psw.c                      |    4 +-
 net/dsa/tag_sja1105.c                         |   30 +-
 net/dsa/tag_trailer.c                         |    4 +-
 net/dsa/tag_xrs700x.c                         |    4 +-
 net/dsa/{slave.c => user.c}                   | 1240 ++++++++---------
 net/dsa/user.h                                |   69 +
 73 files changed, 1392 insertions(+), 1391 deletions(-)
 rename net/dsa/{master.c => conduit.c} (79%)
 create mode 100644 net/dsa/conduit.h
 delete mode 100644 net/dsa/master.h
 delete mode 100644 net/dsa/slave.h
 rename net/dsa/{slave.c => user.c} (67%)
 create mode 100644 net/dsa/user.h

-- 
2.34.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT
  2023-10-10 21:39 [PATCH net-next 0/2] Switch DSA to inclusive terminology Florian Fainelli
@ 2023-10-10 21:39 ` Florian Fainelli
  2023-10-11  1:25   ` Andrew Lunn
       [not found] ` <20231010213942.3633407-2-florian.fainelli@broadcom.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2023-10-10 21:39 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support, open list:DOCUMENTATION,
	open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER

[-- Attachment #1: Type: text/plain, Size: 3641 bytes --]

This preserves the existing IFLA_DSA_MASTER which is part of the uAPI
and creates an alias named IFLA_DSA_CONDUIT.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 Documentation/networking/dsa/configuration.rst |  4 ++--
 include/uapi/linux/if_link.h                   |  3 ++-
 net/dsa/netlink.c                              | 10 +++++-----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/networking/dsa/configuration.rst b/Documentation/networking/dsa/configuration.rst
index a5a38c31736d..7148fb7c7fe1 100644
--- a/Documentation/networking/dsa/configuration.rst
+++ b/Documentation/networking/dsa/configuration.rst
@@ -393,7 +393,7 @@ description which has an ``ethernet`` property. It is up to the user to
 configure the system for the switch to use other conduits.
 
 DSA uses the ``rtnl_link_ops`` mechanism (with a "dsa" ``kind``) to allow
-changing the DSA conduit of a user port. The ``IFLA_DSA_MASTER`` u32 netlink
+changing the DSA conduit of a user port. The ``IFLA_DSA_CONDUIT`` u32 netlink
 attribute contains the ifindex of the conduit device that handles each user
 device. The DSA conduit must be a valid candidate based on firmware node
 information, or a LAG interface which contains only users which are valid
@@ -435,7 +435,7 @@ Using iproute2, the following manipulations are possible:
         dsa master bond0
 
 Notice that in the case of CPU ports under a LAG, the use of the
-``IFLA_DSA_MASTER`` netlink attribute is not strictly needed, but rather, DSA
+``IFLA_DSA_CONDUIT`` netlink attribute is not strictly needed, but rather, DSA
 reacts to the ``IFLA_MASTER`` attribute change of its present conduit (``eth0``)
 and migrates all user ports to the new upper of ``eth0``, ``bond0``. Similarly,
 when ``bond0`` is destroyed using ``RTM_DELLINK``, DSA migrates the user ports
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index fac351a93aed..16f0669e8bdc 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -1392,7 +1392,8 @@ enum {
 
 enum {
 	IFLA_DSA_UNSPEC,
-	IFLA_DSA_MASTER,
+	IFLA_DSA_MASTER,	/* Deprecated, use IFLA_DSA_CONDUIT instead */
+	IFLA_DSA_CONDUIT = IFLA_DSA_MASTER,
 	__IFLA_DSA_MAX,
 };
 
diff --git a/net/dsa/netlink.c b/net/dsa/netlink.c
index f56f90a25b99..1332e56349e5 100644
--- a/net/dsa/netlink.c
+++ b/net/dsa/netlink.c
@@ -8,7 +8,7 @@
 #include "user.h"
 
 static const struct nla_policy dsa_policy[IFLA_DSA_MAX + 1] = {
-	[IFLA_DSA_MASTER]	= { .type = NLA_U32 },
+	[IFLA_DSA_CONDUIT]	= { .type = NLA_U32 },
 };
 
 static int dsa_changelink(struct net_device *dev, struct nlattr *tb[],
@@ -20,8 +20,8 @@ static int dsa_changelink(struct net_device *dev, struct nlattr *tb[],
 	if (!data)
 		return 0;
 
-	if (data[IFLA_DSA_MASTER]) {
-		u32 ifindex = nla_get_u32(data[IFLA_DSA_MASTER]);
+	if (data[IFLA_DSA_CONDUIT]) {
+		u32 ifindex = nla_get_u32(data[IFLA_DSA_CONDUIT]);
 		struct net_device *conduit;
 
 		conduit = __dev_get_by_index(dev_net(dev), ifindex);
@@ -38,7 +38,7 @@ static int dsa_changelink(struct net_device *dev, struct nlattr *tb[],
 
 static size_t dsa_get_size(const struct net_device *dev)
 {
-	return nla_total_size(sizeof(u32)) +	/* IFLA_DSA_MASTER  */
+	return nla_total_size(sizeof(u32)) +	/* IFLA_DSA_CONDUIT  */
 	       0;
 }
 
@@ -46,7 +46,7 @@ static int dsa_fill_info(struct sk_buff *skb, const struct net_device *dev)
 {
 	struct net_device *conduit = dsa_user_to_conduit(dev);
 
-	if (nla_put_u32(skb, IFLA_DSA_MASTER, conduit->ifindex))
+	if (nla_put_u32(skb, IFLA_DSA_CONDUIT, conduit->ifindex))
 		return -EMSGSIZE;
 
 	return 0;
-- 
2.34.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/2] net: dsa: Use conduit and user terms
       [not found] ` <20231010213942.3633407-2-florian.fainelli@broadcom.com>
@ 2023-10-11  1:09   ` Andrew Lunn
  2023-10-12 20:34   ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2023-10-11  1:09 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support, open list:DOCUMENTATION,
	open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER

> -Master network devices
> +conduit network devices
>  ----------------------

Hi Florian

It would be nice if you could do a case preserving search/replace.

I think you also need to fix markup like this, or there might be
warnings from Sphinx.

Conduit and user are good replacements, BTW.

	Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT
  2023-10-10 21:39 ` [PATCH net-next 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT Florian Fainelli
@ 2023-10-11  1:25   ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2023-10-11  1:25 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support, open list:DOCUMENTATION,
	open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER

>  enum {
>  	IFLA_DSA_UNSPEC,
> -	IFLA_DSA_MASTER,
> +	IFLA_DSA_MASTER,	/* Deprecated, use IFLA_DSA_CONDUIT instead */
> +	IFLA_DSA_CONDUIT = IFLA_DSA_MASTER,
>  	__IFLA_DSA_MAX,
>  };

Minor point, but maybe it seems better if we flip this around?

 enum {
 	IFLA_DSA_UNSPEC,
-	IFLA_DSA_MASTER,
+	IFLA_DSA_CONDUIT,	
+	IFLA_DSA_MASTER = IFLA_DSA_CONDUIT, /* Deprecated */
 	__IFLA_DSA_MAX,
 };

 Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/2] net: dsa: Use conduit and user terms
       [not found] ` <20231010213942.3633407-2-florian.fainelli@broadcom.com>
  2023-10-11  1:09   ` [PATCH net-next 1/2] net: dsa: Use conduit and user terms Andrew Lunn
@ 2023-10-12 20:34   ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2023-10-12 20:34 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support, open list:DOCUMENTATION,
	open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER

On Tue, Oct 10, 2023 at 02:39:41PM -0700, Florian Fainelli wrote:
> 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.
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
>  .../bindings/net/dsa/mediatek,mt7530.yaml     |    2 +-

Acked-by: Rob Herring <robh@kernel.org>

>  Documentation/networking/dsa/b53.rst          |   14 +-
>  Documentation/networking/dsa/bcm_sf2.rst      |    2 +-
>  .../networking/dsa/configuration.rst          |  104 +-
>  Documentation/networking/dsa/dsa.rst          |  150 +-
>  Documentation/networking/dsa/lan9303.rst      |    2 +-
>  Documentation/networking/dsa/sja1105.rst      |    8 +-
>  .../dts/marvell/armada-3720-espressobin.dtsi  |    2 +-
>  drivers/net/dsa/b53/b53_common.c              |    4 +-
>  drivers/net/dsa/b53/b53_mdio.c                |    2 +-
>  drivers/net/dsa/bcm_sf2.c                     |   36 +-
>  drivers/net/dsa/bcm_sf2.h                     |    2 +-
>  drivers/net/dsa/bcm_sf2_cfp.c                 |    4 +-
>  drivers/net/dsa/lan9303-core.c                |    4 +-
>  drivers/net/dsa/lantiq_gswip.c                |   34 +-
>  drivers/net/dsa/microchip/ksz9477.c           |    6 +-
>  drivers/net/dsa/microchip/ksz_common.c        |   20 +-
>  drivers/net/dsa/microchip/ksz_ptp.c           |    2 +-
>  drivers/net/dsa/mt7530.c                      |   16 +-
>  drivers/net/dsa/mv88e6xxx/chip.c              |    2 +-
>  drivers/net/dsa/ocelot/felix.c                |   62 +-
>  drivers/net/dsa/ocelot/felix.h                |    4 +-
>  drivers/net/dsa/qca/qca8k-8xxx.c              |   48 +-
>  drivers/net/dsa/qca/qca8k-common.c            |    2 +-
>  drivers/net/dsa/qca/qca8k-leds.c              |    6 +-
>  drivers/net/dsa/qca/qca8k.h                   |    2 +-
>  drivers/net/dsa/realtek/realtek-smi.c         |   28 +-
>  drivers/net/dsa/realtek/realtek.h             |    2 +-
>  drivers/net/dsa/sja1105/sja1105_main.c        |    4 +-
>  drivers/net/dsa/xrs700x/xrs700x.c             |   12 +-
>  drivers/net/ethernet/broadcom/bcmsysport.c    |    2 +-
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c   |    2 +-
>  include/linux/dsa/sja1105.h                   |    2 +-
>  include/net/dsa.h                             |   54 +-
>  include/net/dsa_stubs.h                       |   10 +-
>  net/core/dev_ioctl.c                          |    2 +-
>  net/dsa/Makefile                              |    4 +-
>  net/dsa/{master.c => conduit.c}               |   96 +-
>  net/dsa/conduit.h                             |   22 +
>  net/dsa/dsa.c                                 |  218 +--
>  net/dsa/dsa.h                                 |   10 +-
>  net/dsa/master.h                              |   22 -
>  net/dsa/netlink.c                             |   14 +-
>  net/dsa/port.c                                |  114 +-
>  net/dsa/port.h                                |    2 +-
>  net/dsa/slave.h                               |   69 -
>  net/dsa/switch.c                              |   18 +-
>  net/dsa/switch.h                              |    4 +-
>  net/dsa/tag.c                                 |   10 +-
>  net/dsa/tag.h                                 |   26 +-
>  net/dsa/tag_8021q.c                           |   22 +-
>  net/dsa/tag_8021q.h                           |    2 +-
>  net/dsa/tag_ar9331.c                          |    4 +-
>  net/dsa/tag_brcm.c                            |   14 +-
>  net/dsa/tag_dsa.c                             |    6 +-
>  net/dsa/tag_gswip.c                           |    4 +-
>  net/dsa/tag_hellcreek.c                       |    4 +-
>  net/dsa/tag_ksz.c                             |   12 +-
>  net/dsa/tag_lan9303.c                         |    4 +-
>  net/dsa/tag_mtk.c                             |    4 +-
>  net/dsa/tag_none.c                            |    4 +-
>  net/dsa/tag_ocelot.c                          |   22 +-
>  net/dsa/tag_ocelot_8021q.c                    |   12 +-
>  net/dsa/tag_qca.c                             |    6 +-
>  net/dsa/tag_rtl4_a.c                          |    6 +-
>  net/dsa/tag_rtl8_4.c                          |    6 +-
>  net/dsa/tag_rzn1_a5psw.c                      |    4 +-
>  net/dsa/tag_sja1105.c                         |   30 +-
>  net/dsa/tag_trailer.c                         |    4 +-
>  net/dsa/tag_xrs700x.c                         |    4 +-
>  net/dsa/{slave.c => user.c}                   | 1240 ++++++++---------
>  net/dsa/user.h                                |   69 +
>  72 files changed, 1385 insertions(+), 1385 deletions(-)
>  rename net/dsa/{master.c => conduit.c} (79%)
>  create mode 100644 net/dsa/conduit.h
>  delete mode 100644 net/dsa/master.h
>  delete mode 100644 net/dsa/slave.h
>  rename net/dsa/{slave.c => user.c} (67%)
>  create mode 100644 net/dsa/user.h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-12 20:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-10 21:39 [PATCH net-next 0/2] Switch DSA to inclusive terminology Florian Fainelli
2023-10-10 21:39 ` [PATCH net-next 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT Florian Fainelli
2023-10-11  1:25   ` Andrew Lunn
     [not found] ` <20231010213942.3633407-2-florian.fainelli@broadcom.com>
2023-10-11  1:09   ` [PATCH net-next 1/2] net: dsa: Use conduit and user terms Andrew Lunn
2023-10-12 20:34   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox