* [Cake] quick hack to get netnext-4.2 support for cake
@ 2015-06-17 19:14 Dave Taht
0 siblings, 0 replies; only message in thread
From: Dave Taht @ 2015-06-17 19:14 UTC (permalink / raw)
To: cake
[-- Attachment #1: Type: text/plain, Size: 123 bytes --]
--
Dave Täht
What will it take to vastly improve wifi for everyone?
https://plus.google.com/u/0/explore/makewififast
[-- Attachment #2: 0001-hacked-to-more-or-less-support-netnext-4.2-change-in.patch --]
[-- Type: text/x-patch, Size: 1770 bytes --]
From 07f4195f6980dbfe29406619b7ac525b93b99ffb Mon Sep 17 00:00:00 2001
From: Dave Taht <dave.taht@bufferbloat.net>
Date: Wed, 17 Jun 2015 12:11:45 -0700
Subject: [PATCH] hacked to more or less support netnext-4.2 change in flow
apis
This just gets sch_cake to compile and disable's several
flow models. The new API is in flux and changing rapidly...
recently landed was mpls and macaddr support, for example.
---
sch_cake.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/sch_cake.c b/sch_cake.c
index 80e1cb2..aa357be 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -49,8 +49,11 @@
#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:
@@ -205,12 +208,16 @@ 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,7 +234,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);
// set-associative hashing
--
2.1.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-17 19:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 19:14 [Cake] quick hack to get netnext-4.2 support for cake Dave Taht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox