Skip to content

Commit

Permalink
netdev-linux: Rename sturct nedev_linux field as is_lag_primary
Browse files Browse the repository at this point in the history
Recently OVS adopted a policy of using the inclusive naming word list v1
[1, 2].

This patch partially addresses the use of the term primary in the
context of LAG devices by using the term primary instead: the
is_lag_master field of struct netdev_linux is renamed is_lag_primary.

A related comment is 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>
  • Loading branch information
Simon Horman committed Feb 22, 2024
1 parent 5c7f058 commit 7ddf8ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/netdev-linux-private.h
Expand Up @@ -105,7 +105,7 @@ struct netdev_linux {
uint64_t rx_dropped; /* Packets dropped while recv from kernel. */

/* LAG information. */
bool is_lag_master; /* True if the netdev is a LAG master. */
bool is_lag_primary; /* True if the netdev is a LAG primary. */

int numa_id; /* NUMA node id. */

Expand Down
9 changes: 5 additions & 4 deletions lib/netdev-linux.c
Expand Up @@ -885,7 +885,7 @@ netdev_linux_update__(struct netdev_linux *dev,
}

if (change->primary && netdev_linux_kind_is_lag(change->primary)) {
dev->is_lag_master = true;
dev->is_lag_primary = true;
}

dev->ifindex = change->if_index;
Expand Down Expand Up @@ -3703,8 +3703,9 @@ netdev_linux_get_block_id(struct netdev *netdev_)
netdev_linux_update_via_netlink(netdev);
}

/* Only assigning block ids to linux netdevs that are LAG masters. */
if (netdev->is_lag_master) {
/* Only assigning block ids to linux netdevs that are
* LAG primary members. */
if (netdev->is_lag_primary) {
block_id = netdev->ifindex;
}
ovs_mutex_unlock(&netdev->mutex);
Expand Down Expand Up @@ -6903,7 +6904,7 @@ netdev_linux_update_via_netlink(struct netdev_linux *netdev)
changed = true;
}
if (change->primary && netdev_linux_kind_is_lag(change->primary)) {
netdev->is_lag_master = true;
netdev->is_lag_primary = true;
}
if (changed) {
netdev_change_seq_changed(&netdev->up);
Expand Down

0 comments on commit 7ddf8ac

Please sign in to comment.