* [PATCH net-next v3 0/2] Switch DSA to inclusive terminology
@ 2023-10-13 21:52 Florian Fainelli
2023-10-13 21:52 ` [PATCH net-next v3 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT Florian Fainelli
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Florian Fainelli @ 2023-10-13 21:52 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Broadcom internal kernel review list,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
[-- Attachment #1.1: Type: text/plain, Size: 5216 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.
Changes in v3:
- properly align arguments with the changed function names
- ensure markup delimiters lengths are corrected to the name word length
- maintain the existing wording about LAG devices
Changes in v2:
- addressed kbuild test robots reports
- preserve capitalization where relevant
- fixed build error in mtk_ppe_offload.c
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 | 102 +-
Documentation/networking/dsa/dsa.rst | 156 +-
Documentation/networking/dsa/lan9303.rst | 2 +-
Documentation/networking/dsa/sja1105.rst | 6 +-
.../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 | 68 +-
drivers/net/dsa/ocelot/felix.h | 6 +-
drivers/net/dsa/qca/qca8k-8xxx.c | 50 +-
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 +-
.../net/ethernet/mediatek/mtk_ppe_offload.c | 2 +-
include/linux/dsa/sja1105.h | 2 +-
include/net/dsa.h | 56 +-
include/net/dsa_stubs.h | 22 +-
include/uapi/linux/if_link.h | 4 +-
net/core/dev_ioctl.c | 2 +-
net/dsa/Makefile | 6 +-
net/dsa/{master.c => conduit.c} | 118 +-
net/dsa/conduit.h | 22 +
net/dsa/dsa.c | 222 +--
net/dsa/dsa.h | 12 +-
net/dsa/master.h | 22 -
net/dsa/netlink.c | 22 +-
net/dsa/port.c | 124 +-
net/dsa/port.h | 4 +-
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 | 6 +-
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} | 1462 ++++++++---------
net/dsa/user.h | 69 +
74 files changed, 1539 insertions(+), 1537 deletions(-)
rename net/dsa/{master.c => conduit.c} (76%)
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} (62%)
create mode 100644 net/dsa/user.h
--
2.34.1
[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next v3 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT
2023-10-13 21:52 [PATCH net-next v3 0/2] Switch DSA to inclusive terminology Florian Fainelli
@ 2023-10-13 21:52 ` Florian Fainelli
2023-10-14 0:26 ` [PATCH net-next v3 0/2] Switch DSA to inclusive terminology Stephen Hemminger
[not found] ` <20231013215251.152912-2-florian.fainelli@broadcom.com>
2 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2023-10-13 21:52 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Broadcom internal kernel review list,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
[-- Attachment #1.1: Type: text/plain, Size: 3688 bytes --]
This preserves the existing IFLA_DSA_MASTER which is part of the uAPI
and creates an alias named IFLA_DSA_CONDUIT.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
Documentation/networking/dsa/configuration.rst | 4 ++--
include/uapi/linux/if_link.h | 4 +++-
net/dsa/netlink.c | 10 +++++-----
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/Documentation/networking/dsa/configuration.rst b/Documentation/networking/dsa/configuration.rst
index e6c9719874b0..6cc4ded3cc23 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 slaves 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..30ef80aff033 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -1392,7 +1392,9 @@ enum {
enum {
IFLA_DSA_UNSPEC,
- IFLA_DSA_MASTER,
+ IFLA_DSA_CONDUIT,
+ /* Deprecated, use IFLA_DSA_CONDUIT insted */
+ IFLA_DSA_MASTER = IFLA_DSA_CONDUIT,
__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 #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3 0/2] Switch DSA to inclusive terminology
2023-10-13 21:52 [PATCH net-next v3 0/2] Switch DSA to inclusive terminology Florian Fainelli
2023-10-13 21:52 ` [PATCH net-next v3 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT Florian Fainelli
@ 2023-10-14 0:26 ` Stephen Hemminger
[not found] ` <20231013215251.152912-2-florian.fainelli@broadcom.com>
2 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2023-10-14 0:26 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Broadcom internal kernel review list,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
On Fri, 13 Oct 2023 14:52:49 -0700
Florian Fainelli <florian.fainelli@broadcom.com> wrote:
> 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.
>
> Changes in v3:
> - properly align arguments with the changed function names
> - ensure markup delimiters lengths are corrected to the name word length
> - maintain the existing wording about LAG devices
>
> Changes in v2:
>
> - addressed kbuild test robots reports
> - preserve capitalization where relevant
> - fixed build error in mtk_ppe_offload.c
>
> 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 | 102 +-
> Documentation/networking/dsa/dsa.rst | 156 +-
> Documentation/networking/dsa/lan9303.rst | 2 +-
> Documentation/networking/dsa/sja1105.rst | 6 +-
> .../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 | 68 +-
> drivers/net/dsa/ocelot/felix.h | 6 +-
> drivers/net/dsa/qca/qca8k-8xxx.c | 50 +-
> 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 +-
> .../net/ethernet/mediatek/mtk_ppe_offload.c | 2 +-
> include/linux/dsa/sja1105.h | 2 +-
> include/net/dsa.h | 56 +-
> include/net/dsa_stubs.h | 22 +-
> include/uapi/linux/if_link.h | 4 +-
> net/core/dev_ioctl.c | 2 +-
> net/dsa/Makefile | 6 +-
> net/dsa/{master.c => conduit.c} | 118 +-
> net/dsa/conduit.h | 22 +
> net/dsa/dsa.c | 222 +--
> net/dsa/dsa.h | 12 +-
> net/dsa/master.h | 22 -
> net/dsa/netlink.c | 22 +-
> net/dsa/port.c | 124 +-
> net/dsa/port.h | 4 +-
> 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 | 6 +-
> 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} | 1462 ++++++++---------
> net/dsa/user.h | 69 +
> 74 files changed, 1539 insertions(+), 1537 deletions(-)
> rename net/dsa/{master.c => conduit.c} (76%)
> 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} (62%)
> create mode 100644 net/dsa/user.h
After applying both patches, Ran script to check for non-inclusive naming.
net/dsa/conduit.c: if (netif_is_lag_master(dev))
net/dsa/conduit.c: if (netif_is_lag_master(dev))
net/dsa/conduit.c: if (!netif_is_lag_master(dev)) {
net/dsa/dsa.c: dsa_tree_notify(dst, DSA_NOTIFIER_MASTER_STATE_CHANGE, &info);
net/dsa/dsa.c: if (netif_is_lag_master(conduit))
net/dsa/dsa.c: if (netif_is_lag_master(conduit))
net/dsa/port.c: bridge_dev = netdev_master_upper_dev_get(lag_dev);
net/dsa/port.c: if (!bridge_dev || !netif_is_bridge_master(bridge_dev))
net/dsa/port.c: dp->cpu_port_in_lag = netif_is_lag_master(conduit);
net/dsa/switch.c: case DSA_NOTIFIER_MASTER_STATE_CHANGE:
net/dsa/switch.h: DSA_NOTIFIER_MASTER_STATE_CHANGE,
net/dsa/switch.h:/* DSA_NOTIFIER_MASTER_STATE_CHANGE */
net/dsa/user.c: if (netif_is_bridge_master(upper))
net/dsa/user.c: if (netif_is_bridge_master(info->upper_dev)) {
net/dsa/user.c: } else if (netif_is_lag_master(info->upper_dev)) {
net/dsa/user.c: } else if (is_hsr_master(info->upper_dev)) {
net/dsa/user.c: if (netif_is_bridge_master(info->upper_dev) && !info->linking)
net/dsa/user.c: else if (netif_is_lag_master(info->upper_dev) && !info->linking)
net/dsa/user.c: if (!netif_is_lag_master(dev))
net/dsa/user.c: if (!netif_is_lag_master(dev))
net/dsa/user.c: netif_is_bridge_master(info->upper_dev) && info->linking) {
net/dsa/user.c: if (netif_is_bridge_master(info->upper_dev))
net/dsa/user.c: if (netif_is_lag_master(info->upper_dev))
net/dsa/user.c: if (!netdev_uses_dsa(lag_dev) || !netif_is_lag_master(lag_dev))
net/dsa/user.c: if (!netif_is_bridge_master(br))
net/dsa/user.c: if (netif_is_lag_master(info->upper_dev)) {
net/dsa/user.c: if (netif_is_bridge_master(foreign_dev))
So most of the remaining problem is due to bridge and lag.
Still should change the NOTIFIER since it is not in public API.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3 1/2] net: dsa: Use conduit and user terms
[not found] ` <20231013215251.152912-2-florian.fainelli@broadcom.com>
@ 2023-10-16 13:23 ` Vladimir Oltean
2023-10-16 16:41 ` Florian Fainelli
0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Oltean @ 2023-10-16 13:23 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Florian Fainelli, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Broadcom internal kernel review list,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
On Fri, Oct 13, 2023 at 02:52:50PM -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>
> ---
> diff --git a/Documentation/networking/dsa/configuration.rst b/Documentation/networking/dsa/configuration.rst
> index d2934c40f0f1..e6c9719874b0 100644
> --- a/Documentation/networking/dsa/configuration.rst
> +++ b/Documentation/networking/dsa/configuration.rst
> -Past this point, the DSA slave network devices get delivered regular Ethernet
> +Past this point, the DSA user network devices get delivered regular Ethernet
> frames that can be processed by the networking stack.
>
> -Slave network devices
> +User network devices
> ---------------------
Please adjust section underline width.
Do we want a sentence in the documentation that clarifies that "user interfaces"
and "conduit interfaces" used to be called "slave interfaces" and "master interfaces"
(for 15 years), so that old time users don't get confused as to what happened?
> @@ -863,7 +863,7 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
> }
>
> /* This enforces legacy behavior for switch drivers which assume they can't
> - * receive VLAN configuration when enslaved to a bridge with vlan_filtering=0
> + * receive VLAN configuration when enuserd to a bridge with vlan_filtering=0
when joining a bridge
> */
> bool dsa_port_skip_vlan_configuration(struct dsa_port *dp)
> {
> @@ -1057,7 +1057,7 @@ static int dsa_switch_event(struct notifier_block *nb,
> err = dsa_switch_tag_8021q_vlan_del(ds, info);
> break;
> case DSA_NOTIFIER_MASTER_STATE_CHANGE:
As Stephen points out, maybe you want to change this notifier name as well.
> - err = dsa_switch_master_state_change(ds, info);
> + err = dsa_switch_conduit_state_change(ds, info);
> break;
> default:
> err = -EOPNOTSUPP;
> diff --git a/net/dsa/tag.h b/net/dsa/tag.h
> index 32d12f4a9d73..f6b9c73718df 100644
> --- a/net/dsa/tag.h
> +++ b/net/dsa/tag.h
> @@ -9,7 +9,7 @@
> #include <net/dsa.h>
>
> #include "port.h"
> -#include "slave.h"
> +#include "user.h"
>
> struct dsa_tag_driver {
> const struct dsa_device_ops *ops;
> @@ -29,7 +29,7 @@ static inline int dsa_tag_protocol_overhead(const struct dsa_device_ops *ops)
> return ops->needed_headroom + ops->needed_tailroom;
> }
>
> -static inline struct net_device *dsa_master_find_slave(struct net_device *dev,
> +static inline struct net_device *dsa_conduit_find_user(struct net_device *dev,
> int device, int port)
Please adjust alignment.
> {
> struct dsa_port *cpu_dp = dev->dsa_ptr;
> diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c
> index cbdfc392f7e0..71b26ae6db39 100644
> --- a/net/dsa/tag_8021q.c
> +++ b/net/dsa/tag_8021q.c
> @@ -468,10 +468,10 @@ struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
> }
> EXPORT_SYMBOL_GPL(dsa_8021q_xmit);
>
> -struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master,
> +struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *conduit,
> int vbid)
Alignment.
> {
> - struct dsa_port *cpu_dp = master->dsa_ptr;
> + struct dsa_port *cpu_dp = conduit->dsa_ptr;
> struct dsa_switch_tree *dst = cpu_dp->dst;
> struct dsa_port *dp;
>
> diff --git a/net/dsa/tag_8021q.h b/net/dsa/tag_8021q.h
> index b75cbaa028ef..41f7167ac520 100644
> --- a/net/dsa/tag_8021q.h
> +++ b/net/dsa/tag_8021q.h
> @@ -16,7 +16,7 @@ struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
> void dsa_8021q_rcv(struct sk_buff *skb, int *source_port, int *switch_id,
> int *vbid);
>
> -struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master,
> +struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *conduit,
> int vbid);
Alignment.
> diff --git a/net/dsa/slave.c b/net/dsa/user.c
> similarity index 62%
> rename from net/dsa/slave.c
> rename to net/dsa/user.c
> index 4c3e502d7e16..c03e41e4e660 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/user.c
> @@ -2898,15 +2898,15 @@ static int dsa_slave_prechangeupper(struct net_device *dev,
> else if (netif_is_lag_master(info->upper_dev) && !info->linking)
> dsa_port_pre_lag_leave(dp, info->upper_dev);
> /* dsa_port_pre_hsr_leave is not yet necessary since hsr cannot be
> - * meaningfully enslaved to a bridge yet
> + * meaningfully enuserd to a bridge yet
"cannot be meaningfully be placed under a bridge yet"
> */
>
> return NOTIFY_DONE;
> }
>
> static int
> -dsa_slave_lag_changeupper(struct net_device *dev,
> - struct netdev_notifier_changeupper_info *info)
> +dsa_user_lag_changeupper(struct net_device *dev,
> + struct netdev_notifier_changeupper_info *info)
> {
> struct net_device *lower;
> struct list_head *iter;
> @@ -2991,7 +2991,7 @@ dsa_prevent_bridging_8021q_upper(struct net_device *dev,
> if (br_vlan_enabled(br) &&
> netif_is_bridge_master(info->upper_dev) && info->linking) {
> NL_SET_ERR_MSG_MOD(ext_ack,
> - "Cannot enslave VLAN device into VLAN aware bridge");
> + "Cannot enuser VLAN device into VLAN aware bridge");
"Cannot make VLAN device join VLAN-aware bridge"
> return notifier_from_errno(-EINVAL);
> }
>
> @@ -3050,17 +3050,17 @@ dsa_slave_prechangeupper_sanity_check(struct net_device *dev,
> }
>
> if (is_vlan_dev(info->upper_dev))
> - return dsa_slave_check_8021q_upper(dev, info);
> + return dsa_user_check_8021q_upper(dev, info);
>
> return NOTIFY_DONE;
> }
>
> -/* To be eligible as a DSA master, a LAG must have all lower interfaces be
> - * eligible DSA masters. Additionally, all LAG slaves must be DSA masters of
> +/* To be eligible as a DSA conduit, a LAG must have all lower interfaces be
> + * eligible DSA conduits. Additionally, all LAG users must be DSA conduits of
"Additionally, all LAG slaves" should not be replaced with "users".
"Lowers", "ports" or "slaves", preferably leaving it as "slaves" because
it isn't the topic of this patch.
> * switches in the same switch tree.
> */
> -static int dsa_lag_master_validate(struct net_device *lag_dev,
> - struct netlink_ext_ack *extack)
> +static int dsa_lag_conduit_validate(struct net_device *lag_dev,
> + struct netlink_ext_ack *extack)
> {
> struct net_device *lower1, *lower2;
> struct list_head *iter1, *iter2;
> diff --git a/net/dsa/user.h b/net/dsa/user.h
> new file mode 100644
> index 000000000000..425ed9257858
> --- /dev/null
> +++ b/net/dsa/user.h
> @@ -0,0 +1,69 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +
> +#ifndef __DSA_OPERATIVE_H
> +#define __DSA_OPERATIVE_H
__DSA_USER_H
> +
> +#include <linux/if_bridge.h>
> +#include <linux/if_vlan.h>
> +#include <linux/list.h>
> +#include <linux/netpoll.h>
> +#include <linux/types.h>
> +#include <net/dsa.h>
> +#include <net/gro_cells.h>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3 1/2] net: dsa: Use conduit and user terms
2023-10-16 13:23 ` [PATCH net-next v3 1/2] net: dsa: Use conduit and user terms Vladimir Oltean
@ 2023-10-16 16:41 ` Florian Fainelli
2023-10-16 19:05 ` Vladimir Oltean
0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2023-10-16 16:41 UTC (permalink / raw)
To: Vladimir Oltean, Florian Fainelli
Cc: netdev, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Broadcom internal kernel review list,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
On 10/16/23 06:23, Vladimir Oltean wrote:
> On Fri, Oct 13, 2023 at 02:52:50PM -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>
>> ---
>> diff --git a/Documentation/networking/dsa/configuration.rst b/Documentation/networking/dsa/configuration.rst
>> index d2934c40f0f1..e6c9719874b0 100644
>> --- a/Documentation/networking/dsa/configuration.rst
>> +++ b/Documentation/networking/dsa/configuration.rst
>> -Past this point, the DSA slave network devices get delivered regular Ethernet
>> +Past this point, the DSA user network devices get delivered regular Ethernet
>> frames that can be processed by the networking stack.
>>
>> -Slave network devices
>> +User network devices
>> ---------------------
>
> Please adjust section underline width.
Done.
>
> Do we want a sentence in the documentation that clarifies that "user interfaces"
> and "conduit interfaces" used to be called "slave interfaces" and "master interfaces"
> (for 15 years), so that old time users don't get confused as to what happened?
Sure, we can do that.
>
>> @@ -863,7 +863,7 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
>> }
>>
>> /* This enforces legacy behavior for switch drivers which assume they can't
>> - * receive VLAN configuration when enslaved to a bridge with vlan_filtering=0
>> + * receive VLAN configuration when enuserd to a bridge with vlan_filtering=0
>
> when joining a bridge
>
>> */
>> bool dsa_port_skip_vlan_configuration(struct dsa_port *dp)
>> {
>> @@ -1057,7 +1057,7 @@ static int dsa_switch_event(struct notifier_block *nb,
>> err = dsa_switch_tag_8021q_vlan_del(ds, info);
>> break;
>> case DSA_NOTIFIER_MASTER_STATE_CHANGE:
>
> As Stephen points out, maybe you want to change this notifier name as well.
>
>> - err = dsa_switch_master_state_change(ds, info);
>> + err = dsa_switch_conduit_state_change(ds, info);
>> break;
>> default:
>> err = -EOPNOTSUPP;
>> diff --git a/net/dsa/tag.h b/net/dsa/tag.h
>> index 32d12f4a9d73..f6b9c73718df 100644
>> --- a/net/dsa/tag.h
>> +++ b/net/dsa/tag.h
>> @@ -9,7 +9,7 @@
>> #include <net/dsa.h>
>>
>> #include "port.h"
>> -#include "slave.h"
>> +#include "user.h"
>>
>> struct dsa_tag_driver {
>> const struct dsa_device_ops *ops;
>> @@ -29,7 +29,7 @@ static inline int dsa_tag_protocol_overhead(const struct dsa_device_ops *ops)
>> return ops->needed_headroom + ops->needed_tailroom;
>> }
>>
>> -static inline struct net_device *dsa_master_find_slave(struct net_device *dev,
>> +static inline struct net_device *dsa_conduit_find_user(struct net_device *dev,
>> int device, int port)
>
> Please adjust alignment.
checkpatch did not complain and my editor shows me the alignment appears
to be proper, what am I missing?
>
>> {
>> struct dsa_port *cpu_dp = dev->dsa_ptr;
>> diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c
>> index cbdfc392f7e0..71b26ae6db39 100644
>> --- a/net/dsa/tag_8021q.c
>> +++ b/net/dsa/tag_8021q.c
>> @@ -468,10 +468,10 @@ struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
>> }
>> EXPORT_SYMBOL_GPL(dsa_8021q_xmit);
>>
>> -struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master,
>> +struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *conduit,
>> int vbid)
>
> Alignment.
Likewise.
>
>> {
>> - struct dsa_port *cpu_dp = master->dsa_ptr;
>> + struct dsa_port *cpu_dp = conduit->dsa_ptr;
>> struct dsa_switch_tree *dst = cpu_dp->dst;
>> struct dsa_port *dp;
>>
>> diff --git a/net/dsa/tag_8021q.h b/net/dsa/tag_8021q.h
>> index b75cbaa028ef..41f7167ac520 100644
>> --- a/net/dsa/tag_8021q.h
>> +++ b/net/dsa/tag_8021q.h
>> @@ -16,7 +16,7 @@ struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
>> void dsa_8021q_rcv(struct sk_buff *skb, int *source_port, int *switch_id,
>> int *vbid);
>>
>> -struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master,
>> +struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *conduit,
>> int vbid);
>
> Alignment.
Likewise.
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v3 1/2] net: dsa: Use conduit and user terms
2023-10-16 16:41 ` Florian Fainelli
@ 2023-10-16 19:05 ` Vladimir Oltean
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Oltean @ 2023-10-16 19:05 UTC (permalink / raw)
To: Florian Fainelli
Cc: Florian Fainelli, netdev, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Broadcom internal kernel review list,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
On Mon, Oct 16, 2023 at 09:41:35AM -0700, Florian Fainelli wrote:
> > > @@ -29,7 +29,7 @@ static inline int dsa_tag_protocol_overhead(const struct dsa_device_ops *ops)
> > > return ops->needed_headroom + ops->needed_tailroom;
> > > }
> > > -static inline struct net_device *dsa_master_find_slave(struct net_device *dev,
> > > +static inline struct net_device *dsa_conduit_find_user(struct net_device *dev,
> > > int device, int port)
> >
> > Please adjust alignment.
>
> checkpatch did not complain and my editor shows me the alignment appears to
> be proper, what am I missing?
I didn't realize that the length of "master-slave" is the same as that of "conduit-user",
sorry.
> > > diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c
> > > index cbdfc392f7e0..71b26ae6db39 100644
> > > --- a/net/dsa/tag_8021q.c
> > > +++ b/net/dsa/tag_8021q.c
> > > @@ -468,10 +468,10 @@ struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
> > > }
> > > EXPORT_SYMBOL_GPL(dsa_8021q_xmit);
> > > -struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master,
> > > +struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *conduit,
> > > int vbid)
> >
> > Alignment.
>
> Likewise.
My mistake, sorry.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-16 19:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13 21:52 [PATCH net-next v3 0/2] Switch DSA to inclusive terminology Florian Fainelli
2023-10-13 21:52 ` [PATCH net-next v3 2/2] net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT Florian Fainelli
2023-10-14 0:26 ` [PATCH net-next v3 0/2] Switch DSA to inclusive terminology Stephen Hemminger
[not found] ` <20231013215251.152912-2-florian.fainelli@broadcom.com>
2023-10-16 13:23 ` [PATCH net-next v3 1/2] net: dsa: Use conduit and user terms Vladimir Oltean
2023-10-16 16:41 ` Florian Fainelli
2023-10-16 19:05 ` Vladimir Oltean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).