Skip to content

Commit

Permalink
wip: ci: Use the term hard stop in netdev statistics
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 addresses the use of the term abort within the scope of
netdev statistics. It does so by using the field tx_aborted_errors
as tx_hard_stop_errors.

The primary target for this change is struct netdev_stats.

struct rtnl_link_stats64 is also updated as although this
is a Linux kernel structure, OVS unconditionally provides
a replacement definition.

[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 21, 2024
1 parent 67dc02b commit bdad6c3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/openvswitch/netdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct netdev_stats {
uint64_t rx_missed_errors; /* Receiver missed packet. */

/* Detailed transmit errors. */
uint64_t tx_aborted_errors;
uint64_t tx_hard_stop_errors;
uint64_t tx_carrier_errors;
uint64_t tx_fifo_errors;
uint64_t tx_heartbeat_errors;
Expand Down
2 changes: 1 addition & 1 deletion lib/dpctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ show_dpif(struct dpif *dpif, struct dpctl_params *dpctl_p)
print_stat(dpctl_p, " TX packets:", s.tx_packets);
print_stat(dpctl_p, " errors:", s.tx_errors);
print_stat(dpctl_p, " dropped:", s.tx_dropped);
print_stat(dpctl_p, " aborted:", s.tx_aborted_errors);
print_stat(dpctl_p, " hard stop:", s.tx_hard_stop_errors);
print_stat(dpctl_p, " carrier:", s.tx_carrier_errors);
dpctl_print(dpctl_p, "\n");

Expand Down
2 changes: 1 addition & 1 deletion lib/netdev-afxdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ netdev_afxdp_get_stats(const struct netdev *netdev,
stats->rx_frame_errors += dev_stats.rx_frame_errors;
stats->rx_fifo_errors += dev_stats.rx_fifo_errors;
stats->rx_missed_errors += dev_stats.rx_missed_errors;
stats->tx_aborted_errors += dev_stats.tx_aborted_errors;
stats->tx_hard_stop_errors += dev_stats.tx_aborted_errors;
stats->tx_carrier_errors += dev_stats.tx_carrier_errors;
stats->tx_fifo_errors += dev_stats.tx_fifo_errors;
stats->tx_heartbeat_errors += dev_stats.tx_heartbeat_errors;
Expand Down
4 changes: 2 additions & 2 deletions lib/netdev-bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ convert_stats_system(struct netdev_stats *stats, const struct if_data *ifd)
stats->rx_frame_errors = UINT64_MAX;
stats->rx_fifo_errors = UINT64_MAX;
stats->rx_missed_errors = UINT64_MAX;
stats->tx_aborted_errors = UINT64_MAX;
stats->tx_hard_stop_errors = UINT64_MAX;
stats->tx_carrier_errors = UINT64_MAX;
stats->tx_fifo_errors = UINT64_MAX;
stats->tx_heartbeat_errors = UINT64_MAX;
Expand Down Expand Up @@ -949,7 +949,7 @@ convert_stats_tap(struct netdev_stats *stats, const struct if_data *ifd)
stats->rx_frame_errors = UINT64_MAX;
stats->rx_fifo_errors = UINT64_MAX;
stats->rx_missed_errors = UINT64_MAX;
stats->tx_aborted_errors = UINT64_MAX;
stats->tx_hard_stop_errors = UINT64_MAX;
stats->tx_carrier_errors = UINT64_MAX;
stats->tx_fifo_errors = UINT64_MAX;
stats->tx_heartbeat_errors = UINT64_MAX;
Expand Down
12 changes: 6 additions & 6 deletions lib/netdev-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ struct rtnl_link_stats64 {
uint64_t rx_fifo_errors;
uint64_t rx_missed_errors;

uint64_t tx_aborted_errors;
uint64_t tx_hard_stop_errors;
uint64_t tx_carrier_errors;
uint64_t tx_fifo_errors;
uint64_t tx_heartbeat_errors;
Expand Down Expand Up @@ -2229,7 +2229,7 @@ netdev_stats_from_ovs_vport_stats(struct netdev_stats *dst,
dst->rx_frame_errors = 0;
dst->rx_fifo_errors = 0;
dst->rx_missed_errors = 0;
dst->tx_aborted_errors = 0;
dst->tx_hard_stop_errors = 0;
dst->tx_carrier_errors = 0;
dst->tx_fifo_errors = 0;
dst->tx_heartbeat_errors = 0;
Expand Down Expand Up @@ -2309,7 +2309,7 @@ netdev_linux_get_stats(const struct netdev *netdev_,
stats->rx_frame_errors += dev_stats.rx_frame_errors;
stats->rx_fifo_errors += dev_stats.rx_fifo_errors;
stats->rx_missed_errors += dev_stats.rx_missed_errors;
stats->tx_aborted_errors += dev_stats.tx_aborted_errors;
stats->tx_hard_stop_errors += dev_stats.tx_hard_stop_errors;
stats->tx_carrier_errors += dev_stats.tx_carrier_errors;
stats->tx_fifo_errors += dev_stats.tx_fifo_errors;
stats->tx_heartbeat_errors += dev_stats.tx_heartbeat_errors;
Expand Down Expand Up @@ -2354,7 +2354,7 @@ netdev_tap_get_stats(const struct netdev *netdev_, struct netdev_stats *stats)
stats->rx_frame_errors = 0;
stats->rx_fifo_errors = 0;
stats->rx_missed_errors = 0;
stats->tx_aborted_errors = 0;
stats->tx_hard_stop_errors = 0;
stats->tx_carrier_errors = 0;
stats->tx_fifo_errors = 0;
stats->tx_heartbeat_errors = 0;
Expand Down Expand Up @@ -6675,7 +6675,7 @@ netdev_stats_from_rtnl_link_stats(struct netdev_stats *dst,
dst->rx_frame_errors = src->rx_frame_errors;
dst->rx_fifo_errors = src->rx_fifo_errors;
dst->rx_missed_errors = src->rx_missed_errors;
dst->tx_aborted_errors = src->tx_aborted_errors;
dst->tx_hard_stop_errors = src->tx_aborted_errors;
dst->tx_carrier_errors = src->tx_carrier_errors;
dst->tx_fifo_errors = src->tx_fifo_errors;
dst->tx_heartbeat_errors = src->tx_heartbeat_errors;
Expand Down Expand Up @@ -6703,7 +6703,7 @@ netdev_stats_from_rtnl_link_stats64(struct netdev_stats *dst,
dst->rx_frame_errors = src->rx_frame_errors;
dst->rx_fifo_errors = src->rx_fifo_errors;
dst->rx_missed_errors = src->rx_missed_errors;
dst->tx_aborted_errors = src->tx_aborted_errors;
dst->tx_hard_stop_errors = src->tx_hard_stop_errors;
dst->tx_carrier_errors = src->tx_carrier_errors;
dst->tx_fifo_errors = src->tx_fifo_errors;
dst->tx_heartbeat_errors = src->tx_heartbeat_errors;
Expand Down

0 comments on commit bdad6c3

Please sign in to comment.