From: Thomas Graf Date: Tue, 31 May 2005 22:15:58 +0000 (-0700) Subject: [PKT_SCHED]: Fix dsmark to count ignored indices while walking X-Git-Tag: v2.6.12-rc6~33^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0451eb074eef30240c6c06dacf2911bee26831e1;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [PKT_SCHED]: Fix dsmark to count ignored indices while walking Unused indices which are ignored while walking must still be counted to avoid dumping the same index twice. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 8a3db9d..acbe9d2 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -163,14 +163,15 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker) return; for (i = 0; i < p->indices; i++) { if (p->mask[i] == 0xff && !p->value[i]) - continue; + goto ignore; if (walker->count >= walker->skip) { if (walker->fn(sch, i+1, walker) < 0) { walker->stop = 1; break; } } - walker->count++; +ignore: + walker->count++; } }