mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 23:18:20 +00:00
net_sched: gred: eliminate redundant DP prio comparisons
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>
This commit is contained in:
parent
e29fe837bf
commit
c22e464022
@ -102,9 +102,8 @@ static inline int gred_wred_mode_check(struct Qdisc *sch)
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user