aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_red.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_red.c')
-rw-r--r--net/sched/sch_red.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 0d89dee751a9..dccfa44c2d71 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -51,6 +51,11 @@ static inline int red_use_ecn(struct red_sched_data *q)
51 return q->flags & TC_RED_ECN; 51 return q->flags & TC_RED_ECN;
52} 52}
53 53
54static inline int red_use_harddrop(struct red_sched_data *q)
55{
56 return q->flags & TC_RED_HARDDROP;
57}
58
54static int red_enqueue(struct sk_buff *skb, struct Qdisc* sch) 59static int red_enqueue(struct sk_buff *skb, struct Qdisc* sch)
55{ 60{
56 struct red_sched_data *q = qdisc_priv(sch); 61 struct red_sched_data *q = qdisc_priv(sch);
@@ -76,7 +81,8 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc* sch)
76 81
77 case RED_HARD_MARK: 82 case RED_HARD_MARK:
78 sch->qstats.overlimits++; 83 sch->qstats.overlimits++;
79 if (!red_use_ecn(q) || !INET_ECN_set_ce(skb)) { 84 if (red_use_harddrop(q) || !red_use_ecn(q) ||
85 !INET_ECN_set_ce(skb)) {
80 q->stats.forced_drop++; 86 q->stats.forced_drop++;
81 goto congestion_drop; 87 goto congestion_drop;
82 } 88 }