Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
* [Cake] cake for net-next 4.8
@ 2016-09-25 18:30 Dave Taht
  2016-09-27 14:38 ` Jonathan Morton
  2016-09-27 17:52 ` Jonathan Morton
  0 siblings, 2 replies; 22+ messages in thread
From: Dave Taht @ 2016-09-25 18:30 UTC (permalink / raw)
  To: cake

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

I quickly got sch_cake to work on top of net next. The attached diff
is probably not correct in some respect or another (what's to_free
for? And it looks like statistics collection has been parallelized
elsewhere)

... but I did not crash my box in an hour of trying, with it.

Judging from me tearing apart how TCP BBR works (presently) with ecn,
it looks like we need to add the equivalent to fq_codel ce_threshold
behaviors as well.

https://raw.githubusercontent.com/dtaht/blog-cerowrt/11cabc4c75358c075d4cab770377c986442282ec/content/flent/bbr-cethresh/think_cake_needs_ce_threshold.png



-- 
Dave Täht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org

[-- Attachment #2: quick_hack_for_net_next_4.8.diff --]
[-- Type: text/x-patch, Size: 2478 bytes --]

diff --git a/codel5.h b/codel5.h
index e3fc94c..eb90239 100644
--- a/codel5.h
+++ b/codel5.h
@@ -62,7 +62,8 @@
 #include "codel5_compat.h"
 #else
 #define codel_stats_copy_queue(a, b, c, d) gnet_stats_copy_queue(a, b, c, d)
-#define codel_watchdog_schedule_ns(a, b, c) qdisc_watchdog_schedule_ns(a, b, c)
+// #define codel_watchdog_schedule_ns(a, b, c) qdisc_watchdog_schedule_ns(a, b, c)
+#define codel_watchdog_schedule_ns(a, b, c) qdisc_watchdog_schedule_ns(a, b)
 #endif
 
 
diff --git a/sch_cake.c b/sch_cake.c
index eae532d..e08fa91 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -318,7 +318,7 @@ cake_hash(struct cake_tin_data *q, const struct sk_buff *skb, int flow_mode)
 	host_keys.ports.ports     = 0;
 	host_keys.basic.ip_proto  = 0;
 	host_keys.keyid.keyid     = 0;
-	host_keys.tags.vlan_id    = 0;
+	//	host_keys.tags.vlan_id    = 0;
 	host_keys.tags.flow_label = 0;
 
 	switch (host_keys.control.addr_type) {
@@ -650,7 +650,9 @@ static inline u32 cake_get_diffserv(struct sk_buff *skb)
 
 static void cake_reconfigure(struct Qdisc *sch);
 
-static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch)
+// static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch)
+static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
+			struct sk_buff **to_free)
 {
 	struct cake_sched_data *q = qdisc_priv(sch);
 	u32 idx, tin;
@@ -694,7 +696,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 		segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
 
 		if (IS_ERR_OR_NULL(segs))
-			return qdisc_reshape_fail(skb, sch);
+		  return qdisc_drop(skb, sch, to_free);
 
 		while (segs) {
 			nskb = segs->next;
@@ -859,8 +861,7 @@ begin:
 	/* global hard shaper */
 	if (q->time_next_packet > now) {
 		sch->qstats.overlimits++;
-		codel_watchdog_schedule_ns(&q->watchdog, q->time_next_packet,
-					   true);
+		qdisc_watchdog_schedule_ns(&q->watchdog, q->time_next_packet);
 		return NULL;
 	}
 
@@ -999,7 +1000,7 @@ retry:
 		/* drop this packet, get another one */
 		b->tin_dropped++;
 		qdisc_tree_reduce_backlog(sch, 1, qdisc_pkt_len(skb));
-		qdisc_drop(skb, sch);
+		__qdisc_drop(skb, NULL);
 	}
 
 	b->tin_ecn_mark += !!flow->cvars.ecn_marked;
@@ -1813,7 +1814,7 @@ static struct Qdisc_ops cake_qdisc_ops __read_mostly = {
 	.enqueue	=	cake_enqueue,
 	.dequeue	=	cake_dequeue,
 	.peek		=	qdisc_peek_dequeued,
-	.drop		=	cake_drop,
+	//	.drop		=	cake_drop,
 	.init		=	cake_init,
 	.reset		=	cake_reset,
 	.destroy	=	cake_destroy,

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

end of thread, other threads:[~2016-10-20  5:57 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-25 18:30 [Cake] cake for net-next 4.8 Dave Taht
2016-09-27 14:38 ` Jonathan Morton
2016-09-27 16:04   ` Dave Taht
2016-09-27 16:13     ` Jonathan Morton
2016-09-29 23:22       ` Neil Shepperd
2016-09-30  8:02         ` Toke Høiland-Jørgensen
2016-09-30 13:08           ` Neil Shepperd
2016-09-30 19:42           ` Dave Täht
2016-09-30 20:37             ` Neil Shepperd
2016-09-30 21:10               ` Dave Täht
2016-10-03 21:17                 ` Neil Shepperd
2016-10-04  6:33                   ` Henning Rogge
2016-10-04 16:09                   ` Dave Täht
2016-10-20  5:56                     ` Neil Shepperd
2016-09-27 17:52 ` Jonathan Morton
2016-09-27 18:18   ` Dave Taht
2016-09-27 18:56     ` Jonathan Morton
2016-09-27 19:29       ` Dave Taht
2016-09-27 19:54         ` Jonathan Morton
2016-09-28 23:26       ` Dave Taht
2016-09-28 23:34         ` Jonathan Morton
2016-09-29 20:43           ` Andrew Shewmaker

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