From: Dave Taht <dave.taht@gmail.com>
To: Cake List <cake@lists.bufferbloat.net>
Subject: [Cake] eliminating link_ms and increasing packets to 64 bits
Date: Thu, 22 Mar 2018 14:59:40 -0700 [thread overview]
Message-ID: <CAA93jw7q96gY1W7Sb1V3u0KuUwPMQ=gSzDLg4YgvRd+fPmtAHw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
It looks like tc-adv is currently canonical?
I've briefly tested the attached against net-next.
--
Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619
[-- Attachment #2: 0001-retire-link_ms-and-increase-packets-to-64-bits.patch --]
[-- Type: text/x-patch, Size: 706 bytes --]
From 21d25530b42d6c6e484b673182834275dba6b495 Mon Sep 17 00:00:00 2001
From: Dave Taht <dave.taht@gmail.com>
Date: Thu, 22 Mar 2018 14:53:59 -0700
Subject: [PATCH] retire link_ms and increase packets to 64 bits
the link_ms field was entirely unused
I have certainly managed to overrun the 32 bit packet field, so
increase that to 64 bits.
---
pkt_sched.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pkt_sched.h b/pkt_sched.h
index 71288fb..105dd75 100644
--- a/pkt_sched.h
+++ b/pkt_sched.h
@@ -881,8 +881,7 @@ enum {
#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
struct tc_cake_traffic_stats {
- __u32 packets;
- __u32 link_ms;
+ __u64 packets;
__u64 bytes;
};
--
2.7.4
[-- Attachment #3: tc-adv-u64_packets.patch --]
[-- Type: text/x-patch, Size: 1382 bytes --]
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index c63b7a8..04260ae 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -957,8 +957,7 @@ enum {
#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
struct tc_cake_traffic_stats {
- __u32 packets;
- __u32 link_ms;
+ __u64 packets;
__u64 bytes;
};
diff --git a/tc/q_cake.c b/tc/q_cake.c
index d195093..e544f67 100644
--- a/tc/q_cake.c
+++ b/tc/q_cake.c
@@ -702,7 +702,7 @@ static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
fprintf(f, " pkts ");
FOR_EACH_TIN(stnc, tst, i)
- fprintf(f, " %12u", tst->sent.packets);
+ fprintf(f, " %12llu", tst->sent.packets);
fprintf(f, "\n");
fprintf(f, " bytes ");
@@ -727,17 +727,17 @@ static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
fprintf(f, " drops ");
FOR_EACH_TIN(stnc, tst, i)
- fprintf(f, " %12u", tst->dropped.packets);
+ fprintf(f, " %12llu", tst->dropped.packets);
fprintf(f, "\n");
fprintf(f, " marks ");
FOR_EACH_TIN(stnc, tst, i)
- fprintf(f, " %12u", tst->ecn_marked.packets);
+ fprintf(f, " %12llu", tst->ecn_marked.packets);
fprintf(f, "\n");
fprintf(f, " ack_drop");
FOR_EACH_TIN(stnc, tst, i)
- fprintf(f, " %12u", tst->ack_drops.packets);
+ fprintf(f, " %12llu", tst->ack_drops.packets);
fprintf(f, "\n");
fprintf(f, " sp_flows");
next reply other threads:[~2018-03-22 21:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 21:59 Dave Taht [this message]
2018-03-23 9:58 ` Toke Høiland-Jørgensen
2018-03-23 15:57 ` Dave Taht
2018-03-23 23:01 ` Toke Høiland-Jørgensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA93jw7q96gY1W7Sb1V3u0KuUwPMQ=gSzDLg4YgvRd+fPmtAHw@mail.gmail.com' \
--to=dave.taht@gmail.com \
--cc=cake@lists.bufferbloat.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox