sched: teql_enqueue can check limits before skb enqueue
Subsystems (3)
PATCH 1/1 sched: teql_enqueue can check limits before skb enqueue
Optimize teql_enqueue so that it first checks limits before enqueing.
Patch against net-2.6.22.git
Signed-off-by Krishna Kumar <[email protected]>
---
net/sched/sch_teql.c +2 -3
@@ -94,14 +94,13 @@ teql_enqueue(struct sk_buff *skb, structstruct net_device *dev = sch->dev;struct teql_sched_data *q =qdisc_priv (sch); -__skb_queue_tail (&q->q, skb); -if (q->q.qlen <= dev->tx_queue_len) { +if (q->q.qlen < dev->tx_queue_len) { +__skb_queue_tail (&q->q, skb); sch->bstats.bytes += skb->len; sch->bstats.packets++;return 0 ; } -__skb_unlink (skb, &q->q);kfree_skb (skb); sch->qstats.drops++;return NET_XMIT_DROP ;
From: Krishna Kumar <[email protected]>
Date: Tue, 08 May 2007 13:01:24 +0530
Quoted 6 lines
Optimize
teql_enqueueso that it first checks limits before enqueing.Patch against net-2.6.22.git
Signed-off-by Krishna Kumar <[email protected]>
Applied, thanks.