From: Dave Taht <dave.t...@bufferbloat.net> This moves all but EF marked traffic out of the VO queue, allowing for aggregation of other forms of traffic.
It more aggressively uses the VI queue for interactive-ish traffic. --- ...901-Add-full-diffserv-support-to-wireless.patch | 126 ++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch diff --git a/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch b/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch new file mode 100644 index 0000000..7c19e05 --- /dev/null +++ b/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch @@ -0,0 +1,126 @@ +From 12b7c8b3cb5750f58e560076b93d3a0af1d70e09 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dave=20T=C3=A4ht?= <dave.t...@bufferbloat.net> +Date: Sun, 8 Jul 2012 14:38:32 -0400 +Subject: [PATCH] Add full diffserv support to wireless + +The previous dscp scheme in linux wireless only respected the topmost +3 diffserv priority bits (e.g. CS0 through CS7). This patch respects +all the diffserv bits and all the old-style tos bits that make sense. + +It moves all but EF marked traffic out of the VO queue, where CS6 and +CS7 have been going. + +The imm bit (set by ssh) now moves to VI +Background goes to BK +Most other (obsolete) options move into VI, notably CS6 and CS7 traffic. + +Sort of in keeping with the 802.1q spirit, but not along the actual +performance of 802.1q, the queues are marked with the range 0-7. +--- + net/wireless/util.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 71 insertions(+), 2 deletions(-) + +diff --git a/net/wireless/util.c b/net/wireless/util.c +index 316cfd0..304a6c7 100644 +--- a/net/wireless/util.c ++++ b/net/wireless/util.c +@@ -12,6 +12,8 @@ + #include <net/dsfield.h> + #include "core.h" + ++/* VI, VO, BE, BK */ ++ + struct ieee80211_rate * + ieee80211_get_response_rate(struct ieee80211_supported_band *sband, + u32 basic_rates, int bitrate) +@@ -635,10 +637,77 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, + } + EXPORT_SYMBOL(ieee80211_amsdu_to_8023s); + ++static u8 dscp_table[] = { ++ 0, /* BE = 0x0 */ ++ 0, /* Max-Reliability = 0x1 */ ++ 3, /* Max-Throughput = 0x2 */ ++ 0, /* 0x3 Undefined */ ++ 5, /* Min-Delay = 0x4 */ ++ 0, /* 0x5 Undefined */ ++ 0, /* 0x6 Undefined */ ++ 0, /* 0x7 Undefined */ ++ 1, /* CS1 = 0x8 */ ++ 0, /* 0x9 Undefined */ ++ 3, /* AF11 = 0xa */ ++ 0, /* 0xb Undefined */ ++ 3, /* AF12 = 0xc */ ++ 0, /* 0xd Undefined */ ++ 3, /* AF13 = 0xe */ ++ 0, /* 0xf Undefined */ ++ 2, /* CS2 = 0x10 */ ++ 0, /* 0x11 Undefined */ ++ 3, /* AF21 = 0x12 */ ++ 0, /* 0x13 Undefined */ ++ 3, /* AF22 = 0x14 */ ++ 0, /* 0x15 Undefined */ ++ 3, /* AF23 = 0x16 */ ++ 0, /* 0x17 Undefined */ ++ 4, /* CS3 = 0x18 */ ++ 0, /* 0x19 Undefined */ ++ 3, /* AF31 = 0x1a */ ++ 0, /* 0x1b Undefined */ ++ 3, /* AF32 = 0x1c */ ++ 0, /* 0x1d Undefined */ ++ 3, /* AF33 = 0x1e */ ++ 0, /* 0x1f Undefined */ ++ 5, /* CS4 = 0x20 */ ++ 0, /* 0x21 Undefined */ ++ 5, /* AF41 = 0x22 */ ++ 0, /* 0x23 Undefined */ ++ 5, /* AF42 = 0x24 */ ++ 0, /* 0x25 Undefined */ ++ 4, /* AF43 = 0x26 */ ++ 0, /* 0x27 Undefined */ ++ 5, /* CS5 = 0x28 */ ++ 0, /* 0x29 Undefined */ ++ 0, /* 0x2a Undefined */ ++ 0, /* 0x2b Undefined */ ++ 4, /* VA = 0x2c */ ++ 0, /* 0x2d Undefined */ ++ 6, /* EF = 0x2e */ ++ 0, /* 0x2f Undefined */ ++ 5, /* CS6 = 0x30 */ ++ 0, /* 0x31 Undefined */ ++ 0, /* 0x32 Undefined */ ++ 0, /* 0x33 Undefined */ ++ 0, /* 0x34 Undefined */ ++ 0, /* 0x35 Undefined */ ++ 0, /* 0x36 Undefined */ ++ 0, /* 0x37 Undefined */ ++ 5, /* CS7 = 0x38 */ ++ 0, /* 0x39 Undefined */ ++ 0, /* 0x3a Undefined */ ++ 0, /* 0x3b Undefined */ ++ 0, /* 0x3c Undefined */ ++ 0, /* 0x3d Undefined */ ++ 0, /* 0x3e Undefined */ ++ 0, /* 0x3f Undefined */ ++}; ++ + /* Given a data frame determine the 802.1p/1d tag to use. */ + unsigned int cfg80211_classify8021d(struct sk_buff *skb) + { +- unsigned int dscp; ++ unsigned char dscp; + + /* skb->priority values from 256->263 are magic values to + * directly indicate a specific 802.1d priority. This is used +@@ -659,7 +728,7 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb) + return 0; + } + +- return dscp >> 5; ++ return (dscp_table[dscp>>2]); + } + EXPORT_SYMBOL(cfg80211_classify8021d); + +-- +1.7.9.5 + -- 1.7.9.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel