mbox series

[net-next,v4,0/5] bonding: rename bond components

Message ID 20201106200436.943795-1-jarod@redhat.com
Headers show
Series bonding: rename bond components | expand

Message

Jarod Wilson Nov. 6, 2020, 8:04 p.m. UTC
The bonding driver's use of master and slave, while largely understood
in technical circles, poses a barrier for inclusion to some potential
members of the development and user community, due to the historical
context of masters and slaves, particularly in the United States. This
is a first full pass at replacing those phrases with more socially
inclusive ones, opting for bond to replace master and port to
replace slave, which is congruent with the bridge and team drivers.

There are a few problems with this change. First up, "port" is used in
the bonding 802.3ad code, so the first step here is to rename port to
ad_port, so we can reuse port. Second, we have the issue of not wanting
to break any existing userspace, which I believe this patchset
accomplishes, preserving all existing sysfs and procfs interfaces, and
adding module parameter aliases where necessary.

Third, we do still have the issue of ease of backporting fixes to
-stable trees. I've not had a huge amount of time to spend on it, but
brief forays into coccinelle didn't really pay off (since it's meant to
operate on code, not patches), and the best solution I can come up with
is providing a shell script someone could run over git-format-patch
output before git-am'ing the result to a -stable tree, though scripting
these changes in the first place turned out to be not the best thing to
do anyway, due to subtle cases where use of master or slave can NOT yet
be replaced, so a large amount of work was done by hand, inspection,
trial and error, which is why this set is a lot longer in coming than
I'd originally hoped. I don't expect -stable backports to be horrible to
figure out one way or another though, and I don't believe that a bit of
inconvenience on that front is enough to warrant not making these
changes.

See here for further details on Red Hat's commitment to this work:
https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language

As far as testing goes, I've manually operated on various bonds while
working on this code, and have run it through multiple lnst test runs,
which exercises the existing sysfs interfaces fairly extensively. As far
as I can tell through testing and inspection, there is no breakage of
any existing interfaces with this set.

v2: legacy module parameters are retained this time, and we're trying
out bond/port instead of aggregator/link in place of master/slave. The
procfs interface legacy output is also duplicated or dropped, depending
on Kconfig, rather than being replaced.

v3: remove Kconfig knob, leave sysfs and procfs interfaces entirely
untouched, but update documentation to reference their deprecated
nature, explain the name changes, add references to NetworkManager,
include more netlink/iproute2 examples and make note of netlink
being the preferred interface for userspace interaction with bonds.

v4: documentation table of contents fixes

Cc: Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Thomas Davis <tadavis@lbl.gov>
Cc: netdev@vger.kernel.org

Jarod Wilson (5):
  bonding: rename 802.3ad's struct port to ad_port
  bonding: replace use of the term master where possible
  bonding: rename slave to port where possible
  bonding: rename bonding_sysfs_slave.c to _port.c
  bonding: update Documentation for port/bond terminology

 .clang-format                                 |    4 +-
 Documentation/networking/bonding.rst          |  581 ++--
 drivers/infiniband/core/cma.c                 |    2 +-
 drivers/infiniband/core/lag.c                 |    2 +-
 drivers/infiniband/core/roce_gid_mgmt.c       |   10 +-
 drivers/infiniband/hw/mlx4/main.c             |    2 +-
 drivers/net/bonding/Makefile                  |    2 +-
 drivers/net/bonding/bond_3ad.c                | 1701 ++++++------
 drivers/net/bonding/bond_alb.c                |  689 ++---
 drivers/net/bonding/bond_debugfs.c            |    2 +-
 drivers/net/bonding/bond_main.c               | 2341 +++++++++--------
 drivers/net/bonding/bond_netlink.c            |  114 +-
 drivers/net/bonding/bond_options.c            |  258 +-
 drivers/net/bonding/bond_procfs.c             |   86 +-
 drivers/net/bonding/bond_sysfs.c              |   78 +-
 drivers/net/bonding/bond_sysfs_port.c         |  185 ++
 drivers/net/bonding/bond_sysfs_slave.c        |  176 --
 .../ethernet/chelsio/cxgb3/cxgb3_offload.c    |    2 +-
 .../net/ethernet/mellanox/mlx4/en_netdev.c    |   14 +-
 .../ethernet/mellanox/mlx5/core/en/rep/bond.c |    4 +-
 .../net/ethernet/mellanox/mlx5/core/en_tc.c   |    2 +-
 .../ethernet/netronome/nfp/flower/lag_conf.c  |    2 +-
 .../ethernet/qlogic/netxen/netxen_nic_main.c  |   12 +-
 include/linux/netdevice.h                     |   22 +-
 include/net/bond_3ad.h                        |   42 +-
 include/net/bond_alb.h                        |   74 +-
 include/net/bond_options.h                    |   18 +-
 include/net/bonding.h                         |  362 +--
 include/net/lag.h                             |    2 +-
 29 files changed, 3482 insertions(+), 3307 deletions(-)
 create mode 100644 drivers/net/bonding/bond_sysfs_port.c
 delete mode 100644 drivers/net/bonding/bond_sysfs_slave.c

Comments

Jakub Kicinski Nov. 7, 2020, 2:44 a.m. UTC | #1
On Fri,  6 Nov 2020 15:04:31 -0500 Jarod Wilson wrote:
> The bonding driver's use of master and slave, while largely understood
> in technical circles, poses a barrier for inclusion to some potential
> members of the development and user community, due to the historical
> context of masters and slaves, particularly in the United States. This
> is a first full pass at replacing those phrases with more socially
> inclusive ones, opting for bond to replace master and port to
> replace slave, which is congruent with the bridge and team drivers.

If we decide to go ahead with this, we should probably also use it as
an opportunity to clean up the more egregious checkpatch warnings, WDYT?

Plan minimum - don't add new ones ;)
Jarod Wilson Nov. 9, 2020, 4:47 p.m. UTC | #2
On Fri, Nov 6, 2020 at 9:44 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Fri,  6 Nov 2020 15:04:31 -0500 Jarod Wilson wrote:
> > The bonding driver's use of master and slave, while largely understood
> > in technical circles, poses a barrier for inclusion to some potential
> > members of the development and user community, due to the historical
> > context of masters and slaves, particularly in the United States. This
> > is a first full pass at replacing those phrases with more socially
> > inclusive ones, opting for bond to replace master and port to
> > replace slave, which is congruent with the bridge and team drivers.
>
> If we decide to go ahead with this, we should probably also use it as
> an opportunity to clean up the more egregious checkpatch warnings, WDYT?
>
> Plan minimum - don't add new ones ;)

Hm. I hadn't actually looked at checkpatch output until now. It's...
noisy here. But I'm pretty sure the vast majority of that is from
existing issues, simply reported now due to all the renaming. I can
certainly take a crack at cleanups, but I'd be worried about missing
another merge window trying to sort all of these, when they're not
directly related.
Jakub Kicinski Nov. 9, 2020, 6:54 p.m. UTC | #3
On Mon, 9 Nov 2020 11:47:58 -0500 Jarod Wilson wrote:
> On Fri, Nov 6, 2020 at 9:44 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Fri,  6 Nov 2020 15:04:31 -0500 Jarod Wilson wrote:  
> > > The bonding driver's use of master and slave, while largely understood
> > > in technical circles, poses a barrier for inclusion to some potential
> > > members of the development and user community, due to the historical
> > > context of masters and slaves, particularly in the United States. This
> > > is a first full pass at replacing those phrases with more socially
> > > inclusive ones, opting for bond to replace master and port to
> > > replace slave, which is congruent with the bridge and team drivers.  
> >
> > If we decide to go ahead with this, we should probably also use it as
> > an opportunity to clean up the more egregious checkpatch warnings, WDYT?
> >
> > Plan minimum - don't add new ones ;)  
> 
> Hm. I hadn't actually looked at checkpatch output until now. It's...
> noisy here. But I'm pretty sure the vast majority of that is from
> existing issues, simply reported now due to all the renaming.

I don't think all of them:

-					tx_slave = slaves->arr[hash_index %
+					tx_port = ports->arr[hash_index %
 							       count];

It should be relatively trivial to find incremental warnings.

AFAIR checkpatch has a mode to run on a file, not on a patch, so you
can run it before and after and diff.

> I can
> certainly take a crack at cleanups, but I'd be worried about missing
> another merge window trying to sort all of these, when they're not
> directly related.

TBH I haven't followed the previous discussions too closely, as much 
as I applaud the effort I'm not signing up for reviewing 3.5kLoC of
renames, so I hope you can find someone to review this for you.

Another simple confidence booster would be a confirmation that given
patches do not change the object code.
Jay Vosburgh Nov. 11, 2020, 8:13 p.m. UTC | #4
Jarod Wilson <jarod@redhat.com> wrote:

>The bonding driver's use of master and slave, while largely understood
>in technical circles, poses a barrier for inclusion to some potential
>members of the development and user community, due to the historical
>context of masters and slaves, particularly in the United States. This
>is a first full pass at replacing those phrases with more socially
>inclusive ones, opting for bond to replace master and port to
>replace slave, which is congruent with the bridge and team drivers.
>
>There are a few problems with this change. First up, "port" is used in
>the bonding 802.3ad code, so the first step here is to rename port to
>ad_port, so we can reuse port. Second, we have the issue of not wanting
>to break any existing userspace, which I believe this patchset
>accomplishes, preserving all existing sysfs and procfs interfaces, and
>adding module parameter aliases where necessary.
>
>Third, we do still have the issue of ease of backporting fixes to
>-stable trees. I've not had a huge amount of time to spend on it, but
>brief forays into coccinelle didn't really pay off (since it's meant to
>operate on code, not patches), and the best solution I can come up with
>is providing a shell script someone could run over git-format-patch
>output before git-am'ing the result to a -stable tree, though scripting
>these changes in the first place turned out to be not the best thing to
>do anyway, due to subtle cases where use of master or slave can NOT yet
>be replaced, so a large amount of work was done by hand, inspection,
>trial and error, which is why this set is a lot longer in coming than
>I'd originally hoped. I don't expect -stable backports to be horrible to
>figure out one way or another though, and I don't believe that a bit of
>inconvenience on that front is enough to warrant not making these
>changes.

	I think this undersells the impact a bit; this will most likely
break the majority of cherry-picks for the bonding driver to stable
going forward should this patch set be committed.  Yes, the volume of
patches to bonding is relatively low, and the manual backports are not
likely to be technically difficult.  Nevertheless, I expect that most
bonding backports to stable that cross this patch set will require
manual intervention.

	As such, I'd still like to see explicit direction from the
kernel development community leadership that change sets of this nature
(not technically driven, with long term maintenance implications) are
changes that should be undertaken rather than are merely permitted.

	-J

>See here for further details on Red Hat's commitment to this work:
>https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language
>
>As far as testing goes, I've manually operated on various bonds while
>working on this code, and have run it through multiple lnst test runs,
>which exercises the existing sysfs interfaces fairly extensively. As far
>as I can tell through testing and inspection, there is no breakage of
>any existing interfaces with this set.
>
>v2: legacy module parameters are retained this time, and we're trying
>out bond/port instead of aggregator/link in place of master/slave. The
>procfs interface legacy output is also duplicated or dropped, depending
>on Kconfig, rather than being replaced.
>
>v3: remove Kconfig knob, leave sysfs and procfs interfaces entirely
>untouched, but update documentation to reference their deprecated
>nature, explain the name changes, add references to NetworkManager,
>include more netlink/iproute2 examples and make note of netlink
>being the preferred interface for userspace interaction with bonds.
>
>v4: documentation table of contents fixes
>
>Cc: Jay Vosburgh <j.vosburgh@gmail.com>
>Cc: Veaceslav Falico <vfalico@gmail.com>
>Cc: Andy Gospodarek <andy@greyhouse.net>
>Cc: "David S. Miller" <davem@davemloft.net>
>Cc: Jakub Kicinski <kuba@kernel.org>
>Cc: Thomas Davis <tadavis@lbl.gov>
>Cc: netdev@vger.kernel.org
>
>Jarod Wilson (5):
>  bonding: rename 802.3ad's struct port to ad_port
>  bonding: replace use of the term master where possible
>  bonding: rename slave to port where possible
>  bonding: rename bonding_sysfs_slave.c to _port.c
>  bonding: update Documentation for port/bond terminology
>
> .clang-format                                 |    4 +-
> Documentation/networking/bonding.rst          |  581 ++--
> drivers/infiniband/core/cma.c                 |    2 +-
> drivers/infiniband/core/lag.c                 |    2 +-
> drivers/infiniband/core/roce_gid_mgmt.c       |   10 +-
> drivers/infiniband/hw/mlx4/main.c             |    2 +-
> drivers/net/bonding/Makefile                  |    2 +-
> drivers/net/bonding/bond_3ad.c                | 1701 ++++++------
> drivers/net/bonding/bond_alb.c                |  689 ++---
> drivers/net/bonding/bond_debugfs.c            |    2 +-
> drivers/net/bonding/bond_main.c               | 2341 +++++++++--------
> drivers/net/bonding/bond_netlink.c            |  114 +-
> drivers/net/bonding/bond_options.c            |  258 +-
> drivers/net/bonding/bond_procfs.c             |   86 +-
> drivers/net/bonding/bond_sysfs.c              |   78 +-
> drivers/net/bonding/bond_sysfs_port.c         |  185 ++
> drivers/net/bonding/bond_sysfs_slave.c        |  176 --
> .../ethernet/chelsio/cxgb3/cxgb3_offload.c    |    2 +-
> .../net/ethernet/mellanox/mlx4/en_netdev.c    |   14 +-
> .../ethernet/mellanox/mlx5/core/en/rep/bond.c |    4 +-
> .../net/ethernet/mellanox/mlx5/core/en_tc.c   |    2 +-
> .../ethernet/netronome/nfp/flower/lag_conf.c  |    2 +-
> .../ethernet/qlogic/netxen/netxen_nic_main.c  |   12 +-
> include/linux/netdevice.h                     |   22 +-
> include/net/bond_3ad.h                        |   42 +-
> include/net/bond_alb.h                        |   74 +-
> include/net/bond_options.h                    |   18 +-
> include/net/bonding.h                         |  362 +--
> include/net/lag.h                             |    2 +-
> 29 files changed, 3482 insertions(+), 3307 deletions(-)
> create mode 100644 drivers/net/bonding/bond_sysfs_port.c
> delete mode 100644 drivers/net/bonding/bond_sysfs_slave.c
>
>-- 
>2.28.0
>

---
	-Jay Vosburgh, jay.vosburgh@canonical.com
Jakub Kicinski Nov. 11, 2020, 10:04 p.m. UTC | #5
On Wed, 11 Nov 2020 12:13:56 -0800 Jay Vosburgh wrote:
> Jarod Wilson <jarod@redhat.com> wrote:
> 
> >The bonding driver's use of master and slave, while largely understood
> >in technical circles, poses a barrier for inclusion to some potential
> >members of the development and user community, due to the historical
> >context of masters and slaves, particularly in the United States. This
> >is a first full pass at replacing those phrases with more socially
> >inclusive ones, opting for bond to replace master and port to
> >replace slave, which is congruent with the bridge and team drivers.
> >
> >There are a few problems with this change. First up, "port" is used in
> >the bonding 802.3ad code, so the first step here is to rename port to
> >ad_port, so we can reuse port. Second, we have the issue of not wanting
> >to break any existing userspace, which I believe this patchset
> >accomplishes, preserving all existing sysfs and procfs interfaces, and
> >adding module parameter aliases where necessary.
> >
> >Third, we do still have the issue of ease of backporting fixes to
> >-stable trees. I've not had a huge amount of time to spend on it, but
> >brief forays into coccinelle didn't really pay off (since it's meant to
> >operate on code, not patches), and the best solution I can come up with
> >is providing a shell script someone could run over git-format-patch
> >output before git-am'ing the result to a -stable tree, though scripting
> >these changes in the first place turned out to be not the best thing to
> >do anyway, due to subtle cases where use of master or slave can NOT yet
> >be replaced, so a large amount of work was done by hand, inspection,
> >trial and error, which is why this set is a lot longer in coming than
> >I'd originally hoped. I don't expect -stable backports to be horrible to
> >figure out one way or another though, and I don't believe that a bit of
> >inconvenience on that front is enough to warrant not making these
> >changes.  
> 
> 	I think this undersells the impact a bit; this will most likely
> break the majority of cherry-picks for the bonding driver to stable
> going forward should this patch set be committed.  Yes, the volume of
> patches to bonding is relatively low, and the manual backports are not
> likely to be technically difficult.  Nevertheless, I expect that most
> bonding backports to stable that cross this patch set will require
> manual intervention.
> 
> 	As such, I'd still like to see explicit direction from the
> kernel development community leadership that change sets of this nature
> (not technically driven, with long term maintenance implications) are
> changes that should be undertaken rather than are merely permitted.

Yeah, IDK. I think it's up to you as the maintainer of this code to
make a call based on the specific circumstances. All we have AFAIK
is the coding style statement which discourages new uses:

  For symbol names and documentation, avoid introducing new usage of
  'master / slave' (or 'slave' independent of 'master') and 'blacklist /
  whitelist'.

  Recommended replacements for 'master / slave' are:
    '{primary,main} / {secondary,replica,subordinate}'
    '{initiator,requester} / {target,responder}'
    '{controller,host} / {device,worker,proxy}'
    'leader / follower'
    'director / performer'

  Recommended replacements for 'blacklist/whitelist' are:
    'denylist / allowlist'
    'blocklist / passlist'

  Exceptions for introducing new usage is to maintain a userspace ABI/API,
  or when updating code for an existing (as of 2020) hardware or protocol
  specification that mandates those terms. For new specifications
  translate specification usage of the terminology to the kernel coding
  standard where possible.
Jarod Wilson Nov. 23, 2020, 3:39 a.m. UTC | #6
On Wed, Nov 11, 2020 at 5:04 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 11 Nov 2020 12:13:56 -0800 Jay Vosburgh wrote:
> > Jarod Wilson <jarod@redhat.com> wrote:
> >
> > >The bonding driver's use of master and slave, while largely understood
> > >in technical circles, poses a barrier for inclusion to some potential
> > >members of the development and user community, due to the historical
> > >context of masters and slaves, particularly in the United States. This
> > >is a first full pass at replacing those phrases with more socially
> > >inclusive ones, opting for bond to replace master and port to
> > >replace slave, which is congruent with the bridge and team drivers.
> > >
> > >There are a few problems with this change. First up, "port" is used in
> > >the bonding 802.3ad code, so the first step here is to rename port to
> > >ad_port, so we can reuse port. Second, we have the issue of not wanting
> > >to break any existing userspace, which I believe this patchset
> > >accomplishes, preserving all existing sysfs and procfs interfaces, and
> > >adding module parameter aliases where necessary.
> > >
> > >Third, we do still have the issue of ease of backporting fixes to
> > >-stable trees. I've not had a huge amount of time to spend on it, but
> > >brief forays into coccinelle didn't really pay off (since it's meant to
> > >operate on code, not patches), and the best solution I can come up with
> > >is providing a shell script someone could run over git-format-patch
> > >output before git-am'ing the result to a -stable tree, though scripting
> > >these changes in the first place turned out to be not the best thing to
> > >do anyway, due to subtle cases where use of master or slave can NOT yet
> > >be replaced, so a large amount of work was done by hand, inspection,
> > >trial and error, which is why this set is a lot longer in coming than
> > >I'd originally hoped. I don't expect -stable backports to be horrible to
> > >figure out one way or another though, and I don't believe that a bit of
> > >inconvenience on that front is enough to warrant not making these
> > >changes.
> >
> >       I think this undersells the impact a bit; this will most likely
> > break the majority of cherry-picks for the bonding driver to stable
> > going forward should this patch set be committed.  Yes, the volume of
> > patches to bonding is relatively low, and the manual backports are not
> > likely to be technically difficult.  Nevertheless, I expect that most
> > bonding backports to stable that cross this patch set will require
> > manual intervention.
> >
> >       As such, I'd still like to see explicit direction from the
> > kernel development community leadership that change sets of this nature
> > (not technically driven, with long term maintenance implications) are
> > changes that should be undertaken rather than are merely permitted.
>
> Yeah, IDK. I think it's up to you as the maintainer of this code to
> make a call based on the specific circumstances. All we have AFAIK
> is the coding style statement which discourages new uses:
>
>   For symbol names and documentation, avoid introducing new usage of
>   'master / slave' (or 'slave' independent of 'master') and 'blacklist /
>   whitelist'.
>
>   Recommended replacements for 'master / slave' are:
>     '{primary,main} / {secondary,replica,subordinate}'
>     '{initiator,requester} / {target,responder}'
>     '{controller,host} / {device,worker,proxy}'
>     'leader / follower'
>     'director / performer'
>
>   Recommended replacements for 'blacklist/whitelist' are:
>     'denylist / allowlist'
>     'blocklist / passlist'
>
>   Exceptions for introducing new usage is to maintain a userspace ABI/API,
>   or when updating code for an existing (as of 2020) hardware or protocol
>   specification that mandates those terms. For new specifications
>   translate specification usage of the terminology to the kernel coding
>   standard where possible.

Haven't been able to put much time into this the past few weeks, too
many other things going on leading into the holidays... But I think
Red Hat's general stance on this is that leaving things the way they
are is akin to condoning them. For change to happen, change needs to
happen. I know this starts to get political in a hurry though. I'd
like to see the changes made, even if there's a bit of pain involved
(clearly, since I've dumped this much time and effort into it so far).
:)

I'll try to address issues raised with this version, including the
checkpatch bits, but it may not be until after the first of the year
at this point, with assorted projects trying to get wrapped up before
the holidays, then the holidays themselves, etc.