From patchwork Fri Mar 1 14:50:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 1906734 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TmWHG5Hccz23fC for ; Sat, 2 Mar 2024 01:50:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5A47241E8F; Fri, 1 Mar 2024 14:50:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uDfULN9naTnS; Fri, 1 Mar 2024 14:50:43 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B941A41E15 Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id B941A41E15; Fri, 1 Mar 2024 14:50:42 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 21E14C0DDD; Fri, 1 Mar 2024 14:50:42 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2B41FC0037 for ; Fri, 1 Mar 2024 14:50:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 71E00416DB for ; Fri, 1 Mar 2024 14:50:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CiDiE71AnE1S for ; Fri, 1 Mar 2024 14:50:37 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4b98:dc4:8::229; helo=relay9-d.mail.gandi.net; envelope-from=horms@ovn.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 4A52E40741 Authentication-Results: smtp4.osuosl.org; dmarc=none (p=none dis=none) header.from=ovn.org DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4A52E40741 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4A52E40741 for ; Fri, 1 Mar 2024 14:50:37 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8A7F5FF812 for ; Fri, 1 Mar 2024 14:50:35 +0000 (UTC) From: Simon Horman Date: Fri, 01 Mar 2024 14:50:33 +0000 MIME-Version: 1.0 Message-Id: <20240301-dei-t1-v2-4-10ee89c17b89@ovn.org> References: <20240301-dei-t1-v2-0-10ee89c17b89@ovn.org> In-Reply-To: <20240301-dei-t1-v2-0-10ee89c17b89@ovn.org> To: ovs-dev@openvswitch.org Cc: X-Mailer: b4 0.12.3 X-GND-Sasl: horms@ovn.org Subject: [ovs-dev] [PATCH v2 4/5] netdev-linux: Rename local variables as primary_*. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Recently OVS adopted a policy of using the inclusive naming word list v1 [1, 2]. This patch partially addresses the use of the term master in the context of LAG devices by using the term primary instead: the local variables master_netdev and master_name are renamed as primary_netdev and primary_name. Related comments are also updated. No functional change intended. [1] df5e5cf ("Documentation: Add section on inclusive language.") [2] https://inclusivenaming.org/word-lists/ Signed-off-by: Simon Horman Acked-by: Eelco Chaudron --- lib/netdev-linux.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 1f996454d8f6..1e904d8e6310 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -686,26 +686,26 @@ netdev_linux_update_lag(struct rtnetlink_change *change) lag = shash_find_data(&lag_shash, change->ifname); if (!lag) { - struct netdev *master_netdev; - char master_name[IFNAMSIZ]; + struct netdev *primary_netdev; + char primary_name[IFNAMSIZ]; uint32_t block_id; int error = 0; - if (!if_indextoname(change->master_ifindex, master_name)) { + if (!if_indextoname(change->master_ifindex, primary_name)) { return; } - master_netdev = netdev_from_name(master_name); - if (!master_netdev) { + primary_netdev = netdev_from_name(primary_name); + if (!primary_netdev) { return; } - /* If LAG master is not attached to ovs, ingress block on LAG - * members shoud not be updated. */ - if (!master_netdev->auto_classified && - is_netdev_linux_class(master_netdev->netdev_class)) { - block_id = netdev_get_block_id(master_netdev); + /* If LAG primary member is not attached to ovs, + * ingress block on LAG members should not be updated. */ + if (!primary_netdev->auto_classified && + is_netdev_linux_class(primary_netdev->netdev_class)) { + block_id = netdev_get_block_id(primary_netdev); if (!block_id) { - netdev_close(master_netdev); + netdev_close(primary_netdev); return; } @@ -715,7 +715,7 @@ netdev_linux_update_lag(struct rtnetlink_change *change) /* delete ingress block in case it exists */ tc_add_del_qdisc(change->if_index, false, 0, TC_INGRESS); - /* LAG master is linux netdev so add member to same block. */ + /* LAG primary is linux netdev so add member to same block. */ error = tc_add_del_qdisc(change->if_index, true, block_id, TC_INGRESS); if (error) { @@ -726,7 +726,7 @@ netdev_linux_update_lag(struct rtnetlink_change *change) } } - netdev_close(master_netdev); + netdev_close(primary_netdev); } } else if (change->master_ifindex == 0) { /* Check if this was a lag member that has been removed. */