aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/map/files
Commit message (Expand)AuthorAgeFilesLines
* map: rename type to maptype (FS#3287)Remi NGUYEN VAN2020-08-191-13/+18
* map: add a legacymap optionRemi NGUYEN VAN2020-08-151-7/+5
* map: don't set default firewall zone to wanHans Dedecker2019-05-261-22/+26
* map: drop default encaplimit valueHans Dedecker2018-09-191-1/+1
* map: make tunnel encapsulation limit support configurable (FS#1501)Hans Dedecker2018-06-041-7/+9
* map: use nested json data object to store map-e fmrs parametersHans Dedecker2017-08-291-6/+10
* map: add ealen as configurable uci parameterHans Dedecker2017-08-241-0/+1
* map: delete map-t device when tearing down map interfaceHans Dedecker2017-01-121-1/+11
* map: add sleep work-around for lw4o6 race-conditionSteven Barth2015-06-091-0/+3
* map: shorten autogenerated sub-interface names to account for limitsSteven Barth2015-04-301-2/+2
* map: Fix white space errorsJohn Crispin2015-02-031-3/+3
* map: export calculated ruleset to /tmpSteven Barth2015-01-131-0/+3
* map: fix portsets starting with 0 and use regular NAT for 1:1 MAPSteven Barth2014-10-021-13/+22
* map: add support for map-t if availableSteven Barth2014-06-041-1/+47
* Initial support for MAP-E and Lightweight 4over6 protocolSteven Barth2014-05-221-0/+160
er.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
From b8fc328668a74e1314a19266755a54abd875e5a6 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Sun, 29 Jul 2012 20:52:21 +0000
Subject: [PATCH] codel: refine one condition to avoid a nul rec_inv_sqrt

commit 2359a47671fc4fb0fe5e9945f76c2cb10792c0f8 upstream.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/net/codel.h |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -305,6 +305,8 @@ static struct sk_buff *codel_dequeue(str
 			}
 		}
 	} 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(str
 		 * 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.