diff mbox series

[ovs-dev,v2,4/5] netdev-linux: Rename local variables as primary_*.

Message ID 20240301-dei-t1-v2-4-10ee89c17b89@ovn.org
State Accepted
Delegated to: Simon Horman
Headers show
Series DEI: Address some instances of master and slave | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/intel-ovs-compilation fail test: fail

Commit Message

Simon Horman March 1, 2024, 2:50 p.m. UTC
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 <horms@ovn.org>
---
 lib/netdev-linux.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Comments

Eelco Chaudron March 1, 2024, 4:40 p.m. UTC | #1
On 1 Mar 2024, at 15:50, Simon Horman wrote:

> 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 <horms@ovn.org>

Thanks for fixing these. The changes look good to me.

Acked-by: Eelco Chaudron <echaudro@redhat.com>

//Eelco
diff mbox series

Patch

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. */