]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
compat-wireless: update to 3.5.1-1-snpc.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 18 Aug 2012 17:22:21 +0000 (19:22 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 18 Aug 2012 17:22:21 +0000 (19:22 +0200)
lfs/compat-wireless
src/patches/compat-wireless_codel-avoid-a-nul-rec_inv_sqrt.patch [new file with mode: 0644]

index 24ad75bbfbd3f780124d96148e15909be6b7f387..78bd1d4aa09974116ffa956047e5146c80a9843c 100644 (file)
@@ -26,7 +26,7 @@ include Config
 
 VERSUFIX=ipfire$(KCFG)
 
-VER        = 3.5-3-snpc
+VER        = 3.5.1-1-snpc
 
 ifeq "$(KCFG)" "-xen"
        KVER = 2.6.32.59
@@ -47,7 +47,7 @@ objects = $(DL_FILE) asix-4.4.0.tar.xz
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 asix-4.4.0.tar.xz = $(DL_FROM)/asix-4.4.0.tar.xz
 
-$(DL_FILE)_MD5 = 66f27eed39aacd567f67025305273cd7
+$(DL_FILE)_MD5 = eea8d1c430ad38b713457438e04f47f5
 asix-4.4.0.tar.xz_MD5=633609e889de41554826e0e2cd7bffde
 
 install : $(TARGET)
@@ -82,6 +82,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # kfifo has no license info and taints kernel
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/compat-wireless-2.6.39_kfifo_module_info.patch
 
+       # Codel patches
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/compat-wireless_codel-avoid-a-nul-rec_inv_sqrt.patch
+
        # Build ath5k only if target has pci
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/compat-wireless-3.5-build_ath5k_only_with_pci.patch
 
diff --git a/src/patches/compat-wireless_codel-avoid-a-nul-rec_inv_sqrt.patch b/src/patches/compat-wireless_codel-avoid-a-nul-rec_inv_sqrt.patch
new file mode 100644 (file)
index 0000000..210a58c
--- /dev/null
@@ -0,0 +1,68 @@
+From patchwork Mon Jul 30 06:52:21 2012
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: codel: refine one condition to avoid a nul rec_inv_sqrt
+Date: Sun, 29 Jul 2012 20:52:21 -0000
+From: Eric Dumazet <eric.dumazet@gmail.com>
+X-Patchwork-Id: 173968
+Message-Id: <1343631141.2626.13293.camel@edumazet-glaptop>
+To: David Miller <davem@davemloft.net>
+Cc: netdev <netdev@vger.kernel.org>, Anton Mich <lp2s1h@gmail.com>
+
+From: Eric Dumazet <edumazet@google.com>
+
+One condition before codel_Newton_step() was not good if
+we never left the dropping state for a flow. As a result
+rec_inv_sqrt was 0, instead of the ~0 initial value.
+
+codel control law was then set to a very aggressive mode, dropping
+many packets before reaching 'target' and recovering from this problem.
+
+To keep codel_vars_init() as efficient as possible, refine
+the condition to make sure rec_inv_sqrt initial value is correct
+
+Many thanks to Anton Mich for discovering the issue and suggesting
+a fix.
+
+Reported-by: Anton Mich <lp2s1h@gmail.com>
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+
+---
+include/net/codel.h |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+diff --git a/include/net/codel.h b/include/net/codel.h
+index 550debf..389cf62 100644
+--- a/include/net/codel.h
++++ b/include/net/codel.h
+@@ -305,6 +305,8 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
+                       }
+               }
+       } else if (drop) {
++              u32 delta;
++
+               if (params->ecn && INET_ECN_set_ce(skb)) {
+                       stats->ecn_mark++;
+               } else {
+@@ -320,9 +322,11 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
+                * assume that the drop rate that controlled the queue on the
+                * last cycle is a good starting point to control it now.
+                */
+-              if (codel_time_before(now - vars->drop_next,
++              delta = vars->count - vars->lastcount;
++              if (delta > 1 &&
++                  codel_time_before(now - vars->drop_next,
+                                     16 * params->interval)) {
+-                      vars->count = (vars->count - vars->lastcount) | 1;
++                      vars->count = delta;
+                       /* we dont care if rec_inv_sqrt approximation
+                        * is not very precise :
+                        * Next Newton steps will correct it quadratically.