aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sched/sch_sfq.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 7ef87f9eb675..b1d00f8e09f8 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -361,7 +361,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
361{ 361{
362 struct sfq_sched_data *q = qdisc_priv(sch); 362 struct sfq_sched_data *q = qdisc_priv(sch);
363 unsigned int hash; 363 unsigned int hash;
364 sfq_index x; 364 sfq_index x, qlen;
365 struct sfq_slot *slot; 365 struct sfq_slot *slot;
366 int uninitialized_var(ret); 366 int uninitialized_var(ret);
367 367
@@ -405,8 +405,12 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
405 if (++sch->q.qlen <= q->limit) 405 if (++sch->q.qlen <= q->limit)
406 return NET_XMIT_SUCCESS; 406 return NET_XMIT_SUCCESS;
407 407
408 qlen = slot->qlen;
408 sfq_drop(sch); 409 sfq_drop(sch);
409 return NET_XMIT_CN; 410 /* Return Congestion Notification only if we dropped a packet
411 * from this flow.
412 */
413 return (qlen != slot->qlen) ? NET_XMIT_CN : NET_XMIT_SUCCESS;
410} 414}
411 415
412static struct sk_buff * 416static struct sk_buff *