Skip to content

bonding: rename bond components

Jarod Wilson lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 8 repliesIn review
  2. v35 patches 1 replySuperseded
  3. v26 patches 16 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches12 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5bonding: rename 802.3ad's struct port to ad_portdrivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_main.c drivers/net/bonding/bond_netlink.c +3 more+688 -6890 replies
2/5bonding: replace use of the term master where possibledrivers/infiniband/core/cma.c drivers/infiniband/core/lag.c drivers/infiniband/core/roce_gid_mgmt.c +9 more+58 -561 reply
3/5bonding: rename slave to port where possible.clang-format drivers/infiniband/core/roce_gid_mgmt.c drivers/infiniband/hw/mlx4/main.c +20 more+2420 -23611 reply
4/5bonding: rename bonding_sysfs_slave.c to _port.cdrivers/net/bonding/Makefile drivers/net/bonding/bond_sysfs_port.c+1 -10 replies
5/5bonding: update Documentation for port/bond terminologyDocumentation/networking/bonding.rst+348 -2330 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH net-next v4 0/5] bonding: rename bond components

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 <[email protected]>
Cc Veaceslav Falico <[email protected]>
Cc Andy Gospodarek <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Thomas Davis <[email protected]>

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
Signature · 1 line
2.28.0