diff options
Diffstat (limited to 'net/sched/sch_gred.c')
-rw-r--r-- | net/sched/sch_gred.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 079b0a4ea1c2..29a2dd9f3029 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c | |||
@@ -146,6 +146,11 @@ static inline int gred_use_ecn(struct gred_sched *t) | |||
146 | return t->red_flags & TC_RED_ECN; | 146 | return t->red_flags & TC_RED_ECN; |
147 | } | 147 | } |
148 | 148 | ||
149 | static inline int gred_use_harddrop(struct gred_sched *t) | ||
150 | { | ||
151 | return t->red_flags & TC_RED_HARDDROP; | ||
152 | } | ||
153 | |||
149 | static int gred_enqueue(struct sk_buff *skb, struct Qdisc* sch) | 154 | static int gred_enqueue(struct sk_buff *skb, struct Qdisc* sch) |
150 | { | 155 | { |
151 | struct gred_sched_data *q=NULL; | 156 | struct gred_sched_data *q=NULL; |
@@ -214,7 +219,8 @@ static int gred_enqueue(struct sk_buff *skb, struct Qdisc* sch) | |||
214 | 219 | ||
215 | case RED_HARD_MARK: | 220 | case RED_HARD_MARK: |
216 | sch->qstats.overlimits++; | 221 | sch->qstats.overlimits++; |
217 | if (!gred_use_ecn(t) || !INET_ECN_set_ce(skb)) { | 222 | if (gred_use_harddrop(t) || !gred_use_ecn(t) || |
223 | !INET_ECN_set_ce(skb)) { | ||
218 | q->stats.forced_drop++; | 224 | q->stats.forced_drop++; |
219 | goto congestion_drop; | 225 | goto congestion_drop; |
220 | } | 226 | } |