Cake AQM is experimenting with a codel/blue hybrid AQM COBALT instead
of just using codel alone. This patch updates tc to cope with some new
stats produced by COBALT.
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
PKG_NAME:=iproute2
PKG_VERSION:=4.4.0
PKG_NAME:=iproute2
PKG_VERSION:=4.4.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
-@@ -877,4 +877,55 @@ struct tc_pie_xstats {
+@@ -877,4 +877,56 @@ struct tc_pie_xstats {
__u32 maxq; /* maximum queue size */
__u32 ecn_mark; /* packets marked with ecn*/
};
__u32 maxq; /* maximum queue size */
__u32 ecn_mark; /* packets marked with ecn*/
};
+
+#define TC_CAKE_MAX_TINS (8)
+struct tc_cake_xstats {
+
+#define TC_CAKE_MAX_TINS (8)
+struct tc_cake_xstats {
-+ __u16 version; /* == 3, increments when struct extended */
++ __u16 version; /* == 4, increments when struct extended */
+ __u8 max_tins; /* == TC_CAKE_MAX_TINS */
+ __u8 tin_cnt; /* <= TC_CAKE_MAX_TINS */
+
+ __u8 max_tins; /* == TC_CAKE_MAX_TINS */
+ __u8 tin_cnt; /* <= TC_CAKE_MAX_TINS */
+
+ __u32 base_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to sparse flows */
+ __u16 sparse_flows [TC_CAKE_MAX_TINS];
+ __u16 bulk_flows [TC_CAKE_MAX_TINS];
+ __u32 base_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to sparse flows */
+ __u16 sparse_flows [TC_CAKE_MAX_TINS];
+ __u16 bulk_flows [TC_CAKE_MAX_TINS];
-+ __u32 last_skblen [TC_CAKE_MAX_TINS]; /* skb_headlen */
++ __u16 unresponse_flows [TC_CAKE_MAX_TINS]; /* v4 - was u32 last_len */
++ __u16 spare [TC_CAKE_MAX_TINS]; /* v4 - split last_len */
+ __u32 max_skblen [TC_CAKE_MAX_TINS];
+ __u32 capacity_estimate; /* version 2 */
+ __u32 memory_limit; /* version 3 */
+ __u32 max_skblen [TC_CAKE_MAX_TINS];
+ __u32 capacity_estimate; /* version 2 */
+ __u32 memory_limit; /* version 3 */
--- /dev/null
+++ b/tc/q_cake.c
--- /dev/null
+++ b/tc/q_cake.c
+/*
+ * Common Applications Kept Enhanced -- CAKE
+ *
+/*
+ * Common Applications Kept Enhanced -- CAKE
+ *
+
+ switch(stnc->tin_cnt) {
+ case 4:
+
+ switch(stnc->tin_cnt) {
+ case 4:
-+ fprintf(f, " Bulk Best Effort Video Voice\n");
++ fprintf(f, " Bulk Best Effort Video Voice\n");
-+ fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
++ fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
+ fprintf(f, "%12u", stnc->bulk_flows[i]);
+ fprintf(f, "\n");
+
+ fprintf(f, "%12u", stnc->bulk_flows[i]);
+ fprintf(f, "\n");
+
-+ fprintf(f, " last_len");
-+ for(i=0; i < stnc->tin_cnt; i++)
-+ fprintf(f, "%12u", stnc->last_skblen[i]);
-+ fprintf(f, "\n");
++ if(stnc->version >= 4) {
++ fprintf(f, " un_flows");
++ for(i=0; i < stnc->tin_cnt; i++)
++ fprintf(f, "%12u", stnc->unresponse_flows[i]);
++ fprintf(f, "\n");
++ }
+
+ fprintf(f, " max_len ");
+ for(i=0; i < stnc->tin_cnt; i++)
+
+ fprintf(f, " max_len ");
+ for(i=0; i < stnc->tin_cnt; i++)