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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231204091911.1326130-6-edumazet@google.com>
Date: Mon,  4 Dec 2023 09:19:11 +0000
From: Eric Dumazet <edumazet@...gle.com>
To: David Ahern <dsahern@...nel.org>, Stephen Hemminger <stephen@...workplumber.org>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Neal Cardwell <ncardwell@...gle.com>, netdev@...r.kernel.org, 
	eric.dumazet@...il.com, Eric Dumazet <edumazet@...gle.com>
Subject: [PATCH iproute2 5/5] tc: fq: reports stats added in linux-6.7

Report new fields added in linux-6.7:

- fastpath        : Number of packets that have used the fast path.
- band[012]_pkts  : Number of packets currently queued per band.
- band[012]_drops : Counters of dropped packets, per band
                    (only printed if not zero)

Signed-off-by: Eric Dumazet <edumazet@...gle.com>
---
 tc/q_fq.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/tc/q_fq.c b/tc/q_fq.c
index 08bfbf4ef6db1838bca87d1d87d6923255a1a4f6..7f8a2b80d441857ecadc19ea77545092b7f4f02f 100644
--- a/tc/q_fq.c
+++ b/tc/q_fq.c
@@ -510,6 +510,10 @@ static int fq_print_xstats(struct qdisc_util *qu, FILE *f,
 	print_uint(PRINT_ANY, "throttled", " throttled %u)",
 		   st->throttled_flows);
 
+	print_uint(PRINT_ANY, "band0_pkts", " band0_pkts %u", st->band_pkt_count[0]);
+	print_uint(PRINT_ANY, "band1_pkts", " band1_pkts %u", st->band_pkt_count[1]);
+	print_uint(PRINT_ANY, "band2_pkts", " band2_pkts %u", st->band_pkt_count[2]);
+
 	if (st->time_next_delayed_flow > 0) {
 		print_lluint(PRINT_JSON, "next_packet_delay", NULL,
 			     st->time_next_delayed_flow);
@@ -522,6 +526,10 @@ static int fq_print_xstats(struct qdisc_util *qu, FILE *f,
 	print_lluint(PRINT_ANY, "highprio", " highprio %llu",
 		     st->highprio_packets);
 
+	if (st->fastpath_packets)
+		print_lluint(PRINT_ANY, "fastpath", " fastpath %llu",
+			     st->fastpath_packets);
+
 	if (st->tcp_retrans)
 		print_lluint(PRINT_ANY, "retrans", " retrans %llu",
 			     st->tcp_retrans);
@@ -544,7 +552,10 @@ static int fq_print_xstats(struct qdisc_util *qu, FILE *f,
 			     st->flows_plimit);
 
 	if (st->pkts_too_long || st->allocation_errors ||
-	    st->horizon_drops || st->horizon_caps) {
+	    st->horizon_drops || st->horizon_caps ||
+	    st->band_drops[0] ||
+	    st->band_drops[1] ||
+	    st->band_drops[2]) {
 		print_nl();
 		if (st->pkts_too_long)
 			print_lluint(PRINT_ANY, "pkts_too_long",
@@ -562,6 +573,18 @@ static int fq_print_xstats(struct qdisc_util *qu, FILE *f,
 			print_lluint(PRINT_ANY, "horizon_caps",
 				     "  horizon_caps %llu",
 				     st->horizon_caps);
+		if (st->band_drops[0])
+			print_lluint(PRINT_ANY, "band0_drops",
+				     " band0_drops %llu",
+				     st->band_drops[0]);
+		if (st->band_drops[1])
+			print_lluint(PRINT_ANY, "band1_drops",
+				     " band1_drops %llu",
+				     st->band_drops[1]);
+		if (st->band_drops[2])
+			print_lluint(PRINT_ANY, "band2_drops",
+				     " band2_drops %llu",
+				     st->band_drops[2]);
 	}
 
 	return 0;
-- 
2.43.0.rc2.451.g8631bc7472-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ