Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
* [Cake] a little bit of cake testing
@ 2015-06-04 17:11 Dave Taht
  2015-06-04 18:10 ` Dave Taht
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Taht @ 2015-06-04 17:11 UTC (permalink / raw)
  To: cake

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

My network here is in flux (new modem, signal strength problems, cable
problems) and toke's testbed is presently doing wifi work, so I did a
quick mod to fishcake to make it do linux 4.0 (note I am not sure if
this was a 4.1 or a 4.0 change) - attached. (and we lose a few cake
options due to me not grokking the new API)

Cake did well on this, but the behavior at the tail end of the test
was disturbing:

http://www.dslreports.com/speedtest/611312

Need to do some work to emulate the dslreports tests.

And it dropped  LOT more packets than fq_codel did. fq_codel marked 33
packets for it's result, cake marked 600 and dropped 200, for its.

I did some rrul testing as well, but was fighting with a modem that
used to get 140Mbits, and now only gets 70mbits, and behaves very
differently overall with pfifo_fast than i had ever seen before. And
along the way snapon got upgraded a bit too... sigh...

-- 
Dave Täht
What will it take to vastly improve wifi for everyone?
https://plus.google.com/u/0/explore/makewififast

[-- Attachment #2: 0001-Make-compile-on-linux-4.0-and-later.patch --]
[-- Type: text/x-patch, Size: 2099 bytes --]

From ac49485b29519fb1a4a88bc07e715ea232058397 Mon Sep 17 00:00:00 2001
From: Dave Taht <dave.taht@bufferbloat.net>
Date: Thu, 4 Jun 2015 10:04:46 -0700
Subject: [PATCH] Make compile on linux 4.0 and later

---
 sch_cake.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/sch_cake.c b/sch_cake.c
index 242333c..538d090 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -49,10 +49,12 @@
 #include <linux/vmalloc.h>
 #include <linux/reciprocal_div.h>
 #include <net/netlink.h>
+#include <linux/version.h>
 #include "pkt_sched.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
 #include <net/flow_keys.h>
+#endif
 #include "codel5.h"
-
 /* The CAKE Principle:
  *                 (or, how to have your cake and eat it too)
  *
@@ -205,12 +207,15 @@ enum {
 static inline unsigned int
 cake_fqcd_hash(struct cake_fqcd_sched_data *q, const struct sk_buff *skb, int flow_mode)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
     struct flow_keys keys;
+#endif
     u32 hash, reduced_hash;
 
 	if(unlikely(flow_mode == CAKE_FLOW_NONE || q->flows_cnt < CAKE_SET_WAYS))
 		return 0;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
 	skb_flow_dissect(skb, &keys);
 
 	if(flow_mode != CAKE_FLOW_ALL) {
@@ -227,6 +232,9 @@ cake_fqcd_hash(struct cake_fqcd_sched_data *q, const struct sk_buff *skb, int fl
 	hash = jhash_3words((__force u32)keys.dst,
 						(__force u32)keys.src ^ keys.ip_proto,
 						(__force u32)keys.ports, q->perturbation);
+#else
+	hash = skb_get_hash_perturb(skb, q->perturbation);
+#endif
 
 	reduced_hash = reciprocal_scale(hash, q->flows_cnt);
 
@@ -416,7 +424,7 @@ static int cake_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 	 * Split GSO aggregates if they're likely to impair flow isolation
 	 * or if we need to know individual packet sizes for framing overhead.
 	 */
-	if(unlikely((len * max(fqcd->flow_count, 1)) > q->peel_threshold && skb_is_gso(skb)))
+	if(((len * max((fqcd->flow_count), 1)) > q->peel_threshold && skb_is_gso(skb)))
 	{
 		struct sk_buff *segs, *nskb;
 		netdev_features_t features = netif_skb_features(skb);
-- 
2.1.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-04 20:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 17:11 [Cake] a little bit of cake testing Dave Taht
2015-06-04 18:10 ` Dave Taht
2015-06-04 18:11   ` Dave Taht
2015-06-04 20:31     ` Jonathan Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox