lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Sep 2020 12:42:49 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     dsahern@...il.com
Cc:     stephen@...workplumber.org, netdev@...r.kernel.org,
        Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH iproute2-next] ip: promote missed packets to the -s row

missed_packet_errors are much more commonly reported:

linux$ git grep -c '[.>]rx_missed_errors ' -- drivers/ | wc -l
64
linux$ git grep -c '[.>]rx_over_errors ' -- drivers/ | wc -l
37

Plus those drivers are generally more modern than those
using rx_over_errors.

Since recently merged kernel documentation makes this
preference official, let's make ip -s output more informative
and let rx_missed_errors take the place of rx_over_errors.

Before:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:0a:f7:c1:4d:38 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast
    6.04T      4.67G    0       0       0       67.7M
    RX errors: length   crc     frame   fifo    missed
               0        0       0       0       7
    TX: bytes  packets  errors  dropped carrier collsns
    3.13T      2.76G    0       0       0       0
    TX errors: aborted  fifo   window heartbeat transns
               0        0       0       0       6

After:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:0a:f7:c1:4d:38 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast
    6.04T      4.67G    0       0       7       67.7M
    RX errors: length   crc     frame   fifo    overrun
               0        0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    3.13T      2.76G    0       0       0       0
    TX errors: aborted  fifo   window heartbeat transns
               0        0       0       0       6

Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
 ip/ipaddress.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index ccf67d1dd55c..0822a8d2d792 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -744,7 +744,7 @@ static void __print_link_stats(FILE *fp, struct rtattr *tb[])
 		close_json_object();
 	} else {
 		/* RX stats */
-		fprintf(fp, "    RX: bytes  packets  errors  dropped overrun mcast   %s%s",
+		fprintf(fp, "    RX: bytes  packets  errors  dropped missed  mcast   %s%s",
 			s->rx_compressed ? "compressed" : "", _SL_);
 
 		fprintf(fp, "    ");
@@ -752,7 +752,7 @@ static void __print_link_stats(FILE *fp, struct rtattr *tb[])
 		print_num(fp, 8, s->rx_packets);
 		print_num(fp, 7, s->rx_errors);
 		print_num(fp, 7, s->rx_dropped);
-		print_num(fp, 7, s->rx_over_errors);
+		print_num(fp, 7, s->rx_missed_errors);
 		print_num(fp, 7, s->multicast);
 		if (s->rx_compressed)
 			print_num(fp, 7, s->rx_compressed);
@@ -760,14 +760,14 @@ static void __print_link_stats(FILE *fp, struct rtattr *tb[])
 		/* RX error stats */
 		if (show_stats > 1) {
 			fprintf(fp, "%s", _SL_);
-			fprintf(fp, "    RX errors: length   crc     frame   fifo    missed%s%s",
+			fprintf(fp, "    RX errors: length   crc     frame   fifo    overrun%s%s",
 				s->rx_nohandler ? "   nohandler" : "", _SL_);
 			fprintf(fp, "               ");
 			print_num(fp, 8, s->rx_length_errors);
 			print_num(fp, 7, s->rx_crc_errors);
 			print_num(fp, 7, s->rx_frame_errors);
 			print_num(fp, 7, s->rx_fifo_errors);
-			print_num(fp, 7, s->rx_missed_errors);
+			print_num(fp, 7, s->rx_over_errors);
 			if (s->rx_nohandler)
 				print_num(fp, 7, s->rx_nohandler);
 		}
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ