From: Dave Taht <dave.taht@gmail.com>
To: cake@lists.bufferbloat.net
Subject: [Cake] quick hack to get netnext-4.2 support for cake
Date: Wed, 17 Jun 2015 12:14:42 -0700 [thread overview]
Message-ID: <CAA93jw5Gsjyg9EEN_h+-ctJ9rnxm3SOO8TcVhNRsH845PPtjXw@mail.gmail.com> (raw)
[-- 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
reply other threads:[~2015-06-17 19:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAA93jw5Gsjyg9EEN_h+-ctJ9rnxm3SOO8TcVhNRsH845PPtjXw@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