patch-2.4.22 linux-2.4.22/net/sched/sch_sfq.c
Next file: linux-2.4.22/net/sched/sch_tbf.c
Previous file: linux-2.4.22/net/sched/sch_red.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/net/sched/sch_sfq.c
- Orig date:
2003-06-13 07:51:39.000000000 -0700
diff -urN linux-2.4.21/net/sched/sch_sfq.c linux-2.4.22/net/sched/sch_sfq.c
@@ -209,11 +209,12 @@
sfq_link(q, x);
}
-static int sfq_drop(struct Qdisc *sch)
+static unsigned int sfq_drop(struct Qdisc *sch)
{
struct sfq_sched_data *q = (struct sfq_sched_data *)sch->data;
sfq_index d = q->max_depth;
struct sk_buff *skb;
+ unsigned int len;
/* Queue is full! Find the longest slot and
drop a packet from it */
@@ -221,12 +222,13 @@
if (d > 1) {
sfq_index x = q->dep[d+SFQ_DEPTH].next;
skb = q->qs[x].prev;
+ len = skb->len;
__skb_unlink(skb, &q->qs[x]);
kfree_skb(skb);
sfq_dec(q, x);
sch->q.qlen--;
sch->stats.drops++;
- return 1;
+ return len;
}
if (d == 1) {
@@ -235,13 +237,14 @@
q->next[q->tail] = q->next[d];
q->allot[q->next[d]] += q->quantum;
skb = q->qs[d].prev;
+ len = skb->len;
__skb_unlink(skb, &q->qs[d]);
kfree_skb(skb);
sfq_dec(q, d);
sch->q.qlen--;
q->ht[q->hash[d]] = SFQ_DEPTH;
sch->stats.drops++;
- return 1;
+ return len;
}
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)