Patchwork net_sched: red: Make minor corrections to comments

login
register
mail settings
Submitter David Ward
Date April 15, 2012, 10:31 p.m.
Message ID <1334529106-5035-2-git-send-email-david.ward@ll.mit.edu>
Download mbox | patch
Permalink /patch/152734/
State Superseded
Delegated to: David Miller
Headers show

Comments

David Ward - April 15, 2012, 10:31 p.m.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
 include/net/red.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
David Ward - April 16, 2012, 1:06 p.m.
On 04/15/2012 06:31 PM, Ward, David - 0663 - MITLL wrote:
> diff --git a/include/net/red.h b/include/net/red.h
> index 77d4c37..c0bc25e 100644
> --- a/include/net/red.h
> +++ b/include/net/red.h
> @@ -28,7 +28,7 @@
>   	the inertia of the algorithm. To allow larger bursts, W should be
>   	decreased.
>
> -	if (avg>  th_max) ->  packet marked (dropped).
> +	if (avg>  th_max) ->  packet marked (dropped) with probability max_P.
>   	if (avg<  th_min) ->  packet passes.
>   	if (th_min<  avg<  th_max) we calculate probability:
>
Sorry, this line was correct as it was. (Misleading man page tc-red(8) 
says "Because probability is normally not set to 100%, the queue size 
might conceivably rise above max bytes")

Re-sending with just the other changes (and a patch for that man page).--
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

Patch

diff --git a/include/net/red.h b/include/net/red.h
index 77d4c37..c0bc25e 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -28,7 +28,7 @@ 
 	the inertia of the algorithm. To allow larger bursts, W should be
 	decreased.
 
-	if (avg > th_max) -> packet marked (dropped).
+	if (avg > th_max) -> packet marked (dropped) with probability max_P.
 	if (avg < th_min) -> packet passes.
 	if (th_min < avg < th_max) we calculate probability:
 
@@ -245,7 +245,7 @@  static inline unsigned long red_calc_qavg_from_idle_time(const struct red_parms
 	 *
 	 * dummy packets as a burst after idle time, i.e.
 	 *
-	 * 	p->qavg *= (1-W)^m
+	 * 	v->qavg *= (1-W)^m
 	 *
 	 * This is an apparently overcomplicated solution (f.e. we have to
 	 * precompute a table to make this calculation in reasonable time)
@@ -279,7 +279,7 @@  static inline unsigned long red_calc_qavg_no_idle_time(const struct red_parms *p
 						       unsigned int backlog)
 {
 	/*
-	 * NOTE: p->qavg is fixed point number with point at Wlog.
+	 * NOTE: v->qavg is fixed point number with point at Wlog.
 	 * The formula below is equvalent to floating point
 	 * version:
 	 *
@@ -390,7 +390,7 @@  static inline void red_adaptative_algo(struct red_parms *p, struct red_vars *v)
 	if (red_is_idling(v))
 		qavg = red_calc_qavg_from_idle_time(p, v);
 
-	/* p->qavg is fixed point number with point at Wlog */
+	/* v->qavg is fixed point number with point at Wlog */
 	qavg >>= p->Wlog;
 
 	if (qavg > p->target_max && p->max_P <= MAX_P_MAX)