projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e29fe83
)
net_sched: gred: eliminate redundant DP prio comparisons
author
David Ward
<david.ward@ll.mit.edu>
Thu, 13 Sep 2012 05:22:33 +0000
(
05:22
+0000)
committer
David S. Miller
<davem@davemloft.net>
Thu, 13 Sep 2012 20:10:13 +0000
(16:10 -0400)
Each pair of DPs only needs to be compared once when searching for
a non-unique prio value.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_gred.c
patch
|
blob
|
history
diff --git
a/net/sched/sch_gred.c
b/net/sched/sch_gred.c
index
fca73cd
..
e19d4eb
100644
(file)
--- a/
net/sched/sch_gred.c
+++ b/
net/sched/sch_gred.c
@@
-102,9
+102,8
@@
static inline int gred_wred_mode_check(struct Qdisc *sch)
if (q == NULL)
continue;
if (q == NULL)
continue;
- for (n = 0; n < table->DPs; n++)
- if (table->tab[n] && table->tab[n] != q &&
- table->tab[n]->prio == q->prio)
+ for (n = i + 1; n < table->DPs; n++)
+ if (table->tab[n] && table->tab[n]->prio == q->prio)
return 1;
}
return 1;
}