#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/system.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/jiffies.h>
int ret;
if (skb->len > q->max_size) {
- sch->stats.drops++;
+ sch->qstats.drops++;
#ifdef CONFIG_NET_CLS_POLICE
if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch))
#endif
}
if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) {
- sch->stats.drops++;
+ sch->qstats.drops++;
return ret;
}
sch->q.qlen++;
- sch->stats.bytes += skb->len;
- sch->stats.packets++;
+ sch->bstats.bytes += skb->len;
+ sch->bstats.packets++;
return 0;
}
struct tbf_sched_data *q = qdisc_priv(sch);
int ret;
- if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0)
+ if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) {
sch->q.qlen++;
+ sch->qstats.requeues++;
+ }
return ret;
}
if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) {
sch->q.qlen--;
- sch->stats.drops++;
+ sch->qstats.drops++;
}
return len;
}
if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) {
/* When requeue fails skb is dropped */
sch->q.qlen--;
- sch->stats.drops++;
+ sch->qstats.drops++;
}
sch->flags |= TCQ_F_THROTTLED;
- sch->stats.overlimits++;
+ sch->qstats.overlimits++;
}
return NULL;
}
struct Qdisc *child = NULL;
int max_size,n;
- if (rtattr_parse(tb, TCA_TBF_PTAB, RTA_DATA(opt), RTA_PAYLOAD(opt)) ||
+ if (rtattr_parse_nested(tb, TCA_TBF_PTAB, opt) ||
tb[TCA_TBF_PARMS-1] == NULL ||
RTA_PAYLOAD(tb[TCA_TBF_PARMS-1]) < sizeof(*qopt))
goto done;