patch-2.3.15 linux/net/sched/sch_prio.c
Next file: linux/net/sched/sch_red.c
Previous file: linux/net/sched/sch_generic.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Mon Aug 23 10:01:02 1999
- Orig file:
v2.3.14/linux/net/sched/sch_prio.c
- Orig date:
Wed Jun 9 14:45:37 1999
diff -u --recursive --new-file v2.3.14/linux/net/sched/sch_prio.c linux/net/sched/sch_prio.c
@@ -69,17 +69,18 @@
{
struct prio_sched_data *q = (struct prio_sched_data *)sch->data;
struct Qdisc *qdisc;
+ int ret;
qdisc = q->queues[prio_classify(skb, sch)];
- if (qdisc->enqueue(skb, qdisc) == 1) {
+ if ((ret = qdisc->enqueue(skb, qdisc)) == 0) {
sch->stats.bytes += skb->len;
sch->stats.packets++;
sch->q.qlen++;
- return 1;
+ return 0;
}
sch->stats.drops++;
- return 0;
+ return ret;
}
@@ -88,15 +89,16 @@
{
struct prio_sched_data *q = (struct prio_sched_data *)sch->data;
struct Qdisc *qdisc;
+ int ret;
qdisc = q->queues[prio_classify(skb, sch)];
- if (qdisc->ops->requeue(skb, qdisc) == 1) {
+ if ((ret = qdisc->ops->requeue(skb, qdisc)) == 0) {
sch->q.qlen++;
- return 1;
+ return 0;
}
sch->stats.drops++;
- return 0;
+ return ret;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)