[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070323133528.10264.68156.sendpatchset@localhost.localdomain>
Date: Fri, 23 Mar 2007 14:35:53 +0100 (MET)
From: Patrick McHardy <kaber@...sh.net>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, Patrick McHardy <kaber@...sh.net>
Subject: [NET_SCHED 11/11]: qdisc: avoid dequeue while throttled
[NET_SCHED]: qdisc: avoid dequeue while throttled
Avoid dequeueing while the device is throttled.
Signed-off-by: Patrick McHardy <kaber@...sh.net>
---
commit 69f6039ded0bdaf93e3fc954140caae1e7fc9927
tree 9894ce3afc9f7e5cadb26269827ba4d4bca393fc
parent e2459acd7dee06fb4d5e980f26c23d31db0e5de1
author Patrick McHardy <kaber@...sh.net> Fri, 23 Mar 2007 10:31:32 +0100
committer Patrick McHardy <kaber@...sh.net> Fri, 23 Mar 2007 10:31:32 +0100
net/sched/sch_generic.c | 4 ++++
net/sched/sch_netem.c | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 52eb343..39c5312 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -93,6 +93,10 @@ static inline int qdisc_restart(struct net_device *dev)
struct Qdisc *q = dev->qdisc;
struct sk_buff *skb;
+ smp_rmb();
+ if (q->flags & TCQ_F_THROTTLED)
+ return q->q.qlen;
+
/* Dequeue packet */
if (((skb = dev->gso_skb)) || ((skb = q->dequeue(q)))) {
unsigned nolock = (dev->features & NETIF_F_LLTX);
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 5d9d8bc..4c7a8d8 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -273,10 +273,6 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
struct netem_sched_data *q = qdisc_priv(sch);
struct sk_buff *skb;
- smp_mb();
- if (sch->flags & TCQ_F_THROTTLED)
- return NULL;
-
skb = q->qdisc->dequeue(q->qdisc);
if (skb) {
const struct netem_skb_cb *cb
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists