All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] bonding: rename bond components
@ 2020-10-02 17:39 Jarod Wilson
  2020-10-02 17:39 ` [PATCH net-next v2 1/6] bonding: rename 802.3ad's struct port to ad_port Jarod Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Jarod Wilson @ 2020-10-02 17:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jarod Wilson, Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S. Miller, Jakub Kicinski, Thomas Davis, netdev

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, while also adding alternate interfaces using the new
terminology. This set also includes a Kconfig option that will let
people make the conscious decision to break userspace and no longer
expose the original master/slave interfaces, once their userspace is
able to cope with their removal.

Lastly, 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, there is no breakage of existing interfaces with this
set, unless the user consciously opts to do so via Kconfig.

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.

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 (6):
  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
  bonding: make Kconfig toggle to disable legacy interfaces

 .clang-format                                 |    4 +-
 Documentation/networking/bonding.rst          |  440 ++--
 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/Kconfig                           |   12 +
 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               | 2339 +++++++++--------
 drivers/net/bonding/bond_netlink.c            |  114 +-
 drivers/net/bonding/bond_options.c            |  258 +-
 drivers/net/bonding/bond_procfs.c             |  102 +-
 drivers/net/bonding/bond_sysfs.c              |  242 +-
 drivers/net/bonding/bond_sysfs_port.c         |  187 ++
 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 +-
 30 files changed, 3512 insertions(+), 3328 deletions(-)
 create mode 100644 drivers/net/bonding/bond_sysfs_port.c
 delete mode 100644 drivers/net/bonding/bond_sysfs_slave.c

-- 
2.27.0


^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [PATCH net-next v2 3/6] bonding: rename slave to port where possible
@ 2020-10-03  8:11 kernel test robot
  0 siblings, 0 replies; 24+ messages in thread
From: kernel test robot @ 2020-10-03  8:11 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201002174001.3012643-4-jarod@redhat.com>
References: <20201002174001.3012643-4-jarod@redhat.com>
TO: Jarod Wilson <jarod@redhat.com>
TO: linux-kernel(a)vger.kernel.org
CC: Jarod Wilson <jarod@redhat.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Thomas Davis <tadavis@lbl.gov>
CC: netdev(a)vger.kernel.org

Hi Jarod,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Jarod-Wilson/bonding-rename-bond-components/20201003-014336
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 360f89874635b08057757376b8cc4faa221862e2
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
config: x86_64-randconfig-m001-20201002 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/net/bonding/bond_procfs.c:219 bond_info_show_port() warn: '%pM' expects argument of type u8 * or bdaddr_t *, argument 3 has type 'struct mac_addr*'

Old smatch warnings:
drivers/net/bonding/bond_procfs.c:148 bond_info_show_bond_dev() warn: '%pM' expects argument of type u8 * or bdaddr_t *, argument 3 has type 'struct mac_addr*'
drivers/net/bonding/bond_procfs.c:233 bond_info_show_port() warn: '%pM' expects argument of type u8 * or bdaddr_t *, argument 3 has type 'struct mac_addr*'

vim +219 drivers/net/bonding/bond_procfs.c

bd33acc3cc52597 Amerigo Wang      2011-03-06  172  
65bc9ec971ab2ab Jarod Wilson      2020-10-02  173  static void bond_info_show_port(struct seq_file *seq,
65bc9ec971ab2ab Jarod Wilson      2020-10-02  174  				 const struct bond_port *port)
bd33acc3cc52597 Amerigo Wang      2011-03-06  175  {
7ceed065451aba9 Christoph Hellwig 2018-04-11  176  	struct bonding *bond = PDE_DATA(file_inode(seq->file));
bd33acc3cc52597 Amerigo Wang      2011-03-06  177  
65bc9ec971ab2ab Jarod Wilson      2020-10-02  178  	seq_printf(seq, "\nPort Interface: %s\n", port->dev->name);
65bc9ec971ab2ab Jarod Wilson      2020-10-02  179  	seq_printf(seq, "Slave Interface: %s\n", port->dev->name);
65bc9ec971ab2ab Jarod Wilson      2020-10-02  180  	seq_printf(seq, "MII Status: %s\n", bond_port_link_status(port->link));
65bc9ec971ab2ab Jarod Wilson      2020-10-02  181  	if (port->speed == SPEED_UNKNOWN)
98f41f694f46085 Weiping Pan       2011-10-31  182  		seq_printf(seq, "Speed: %s\n", "Unknown");
98f41f694f46085 Weiping Pan       2011-10-31  183  	else
65bc9ec971ab2ab Jarod Wilson      2020-10-02  184  		seq_printf(seq, "Speed: %d Mbps\n", port->speed);
98f41f694f46085 Weiping Pan       2011-10-31  185  
65bc9ec971ab2ab Jarod Wilson      2020-10-02  186  	if (port->duplex == DUPLEX_UNKNOWN)
98f41f694f46085 Weiping Pan       2011-10-31  187  		seq_printf(seq, "Duplex: %s\n", "Unknown");
98f41f694f46085 Weiping Pan       2011-10-31  188  	else
65bc9ec971ab2ab Jarod Wilson      2020-10-02  189  		seq_printf(seq, "Duplex: %s\n", port->duplex ? "full" : "half");
98f41f694f46085 Weiping Pan       2011-10-31  190  
bd33acc3cc52597 Amerigo Wang      2011-03-06  191  	seq_printf(seq, "Link Failure Count: %u\n",
65bc9ec971ab2ab Jarod Wilson      2020-10-02  192  		   port->link_failure_count);
bd33acc3cc52597 Amerigo Wang      2011-03-06  193  
faeeb317a561507 Jarod Wilson      2017-04-04  194  	seq_printf(seq, "Permanent HW addr: %*phC\n",
65bc9ec971ab2ab Jarod Wilson      2020-10-02  195  		   port->dev->addr_len, port->perm_hwaddr);
65bc9ec971ab2ab Jarod Wilson      2020-10-02  196  	seq_printf(seq, "Port queue ID: %d\n", port->queue_id);
65bc9ec971ab2ab Jarod Wilson      2020-10-02  197  	seq_printf(seq, "Slave queue ID: %d\n", port->queue_id);
bd33acc3cc52597 Amerigo Wang      2011-03-06  198  
01844098ecd9564 Veaceslav Falico  2014-05-15  199  	if (BOND_MODE(bond) == BOND_MODE_8023AD) {
65bc9ec971ab2ab Jarod Wilson      2020-10-02  200  		const struct ad_port *ad_port = &PORT_AD_INFO(port)->ad_port;
d0e49c30a3c75ad Jarod Wilson      2020-10-02  201  		const struct aggregator *agg = ad_port->aggregator;
bd33acc3cc52597 Amerigo Wang      2011-03-06  202  
14c9551a32eba08 Mahesh Bandewar   2015-02-23  203  		if (agg) {
bd33acc3cc52597 Amerigo Wang      2011-03-06  204  			seq_printf(seq, "Aggregator ID: %d\n",
bd33acc3cc52597 Amerigo Wang      2011-03-06  205  				   agg->aggregator_identifier);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  206  			seq_printf(seq, "Actor Churn State: %s\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  207  				   bond_3ad_churn_desc(ad_port->sm_churn_actor_state));
14c9551a32eba08 Mahesh Bandewar   2015-02-23  208  			seq_printf(seq, "Partner Churn State: %s\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  209  				   bond_3ad_churn_desc(ad_port->sm_churn_partner_state));
14c9551a32eba08 Mahesh Bandewar   2015-02-23  210  			seq_printf(seq, "Actor Churned Count: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  211  				   ad_port->churn_actor_count);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  212  			seq_printf(seq, "Partner Churned Count: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  213  				   ad_port->churn_partner_count);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  214  
4cd6b4754492c08 Mahesh Bandewar   2015-06-18  215  			if (capable(CAP_NET_ADMIN)) {
14c9551a32eba08 Mahesh Bandewar   2015-02-23  216  				seq_puts(seq, "details actor lacp pdu:\n");
14c9551a32eba08 Mahesh Bandewar   2015-02-23  217  				seq_printf(seq, "    system priority: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  218  					   ad_port->actor_system_priority);
74514957552edd4 Mahesh Bandewar   2015-05-09 @219  				seq_printf(seq, "    system mac address: %pM\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  220  					   &ad_port->actor_system);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  221  				seq_printf(seq, "    port key: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  222  					   ad_port->actor_oper_port_key);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  223  				seq_printf(seq, "    port priority: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  224  					   ad_port->actor_port_priority);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  225  				seq_printf(seq, "    port number: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  226  					   ad_port->actor_port_number);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  227  				seq_printf(seq, "    port state: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  228  					   ad_port->actor_oper_port_state);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  229  
14c9551a32eba08 Mahesh Bandewar   2015-02-23  230  				seq_puts(seq, "details partner lacp pdu:\n");
14c9551a32eba08 Mahesh Bandewar   2015-02-23  231  				seq_printf(seq, "    system priority: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  232  					   ad_port->partner_oper.system_priority);
74514957552edd4 Mahesh Bandewar   2015-05-09  233  				seq_printf(seq, "    system mac address: %pM\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  234  					   &ad_port->partner_oper.system);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  235  				seq_printf(seq, "    oper key: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  236  					   ad_port->partner_oper.key);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  237  				seq_printf(seq, "    port priority: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  238  					   ad_port->partner_oper.port_priority);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  239  				seq_printf(seq, "    port number: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  240  					   ad_port->partner_oper.port_number);
14c9551a32eba08 Mahesh Bandewar   2015-02-23  241  				seq_printf(seq, "    port state: %d\n",
d0e49c30a3c75ad Jarod Wilson      2020-10-02  242  					   ad_port->partner_oper.port_state);
4cd6b4754492c08 Mahesh Bandewar   2015-06-18  243  			}
14c9551a32eba08 Mahesh Bandewar   2015-02-23  244  		} else {
bd33acc3cc52597 Amerigo Wang      2011-03-06  245  			seq_puts(seq, "Aggregator ID: N/A\n");
bd33acc3cc52597 Amerigo Wang      2011-03-06  246  		}
14c9551a32eba08 Mahesh Bandewar   2015-02-23  247  	}
bd33acc3cc52597 Amerigo Wang      2011-03-06  248  }
bd33acc3cc52597 Amerigo Wang      2011-03-06  249  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30590 bytes --]

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

end of thread, other threads:[~2020-10-05 17:36 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 17:39 [PATCH net-next v2 0/6] bonding: rename bond components Jarod Wilson
2020-10-02 17:39 ` [PATCH net-next v2 1/6] bonding: rename 802.3ad's struct port to ad_port Jarod Wilson
2020-10-02 17:39 ` [PATCH net-next v2 2/6] bonding: replace use of the term master where possible Jarod Wilson
2020-10-02 17:39 ` [PATCH net-next v2 3/6] bonding: rename slave to port " Jarod Wilson
2020-10-02 20:20   ` Miguel Ojeda
2020-10-02 17:39 ` [PATCH net-next v2 4/6] bonding: rename bonding_sysfs_slave.c to _port.c Jarod Wilson
2020-10-02 17:40 ` [PATCH net-next v2 5/6] bonding: update Documentation for port/bond terminology Jarod Wilson
2020-10-02 18:09   ` Andrew Lunn
2020-10-02 20:17     ` Jarod Wilson
2020-10-02 20:43       ` Andrew Lunn
2020-10-02 19:10   ` Stephen Hemminger
2020-10-02 20:12     ` Jarod Wilson
2020-10-02 22:55       ` David Miller
2020-10-03 19:44         ` Jarod Wilson
2020-10-02 17:40 ` [PATCH net-next v2 6/6] bonding: make Kconfig toggle to disable legacy interfaces Jarod Wilson
2020-10-02 19:13   ` Stephen Hemminger
2020-10-02 20:23     ` Jarod Wilson
2020-10-02 22:42       ` Stephen Hemminger
2020-10-03 19:50         ` Jarod Wilson
2020-10-02 22:57       ` David Miller
2020-10-03 19:48         ` Jarod Wilson
2020-10-05 17:36           ` Jay Vosburgh
2020-10-02 22:53     ` David Miller
2020-10-03  8:11 [PATCH net-next v2 3/6] bonding: rename slave to port where possible kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.