[NET] SCHED: Fix whitespace errors.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YOSHIFUJI Hideaki 2007-02-09 23:25:16 +09:00 committed by David S. Miller
parent 7612713fb6
commit 10297b9931
33 changed files with 207 additions and 207 deletions

View File

@ -65,7 +65,7 @@ int tcf_hash_release(struct tcf_common *p, int bind,
p->tcfc_bindcnt--; p->tcfc_bindcnt--;
p->tcfc_refcnt--; p->tcfc_refcnt--;
if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) { if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) {
tcf_hash_destroy(p, hinfo); tcf_hash_destroy(p, hinfo);
ret = 1; ret = 1;
} }
@ -362,7 +362,7 @@ static struct tc_action_ops *tc_lookup_action_id(u32 type)
#endif #endif
int tcf_action_exec(struct sk_buff *skb, struct tc_action *act, int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
struct tcf_result *res) struct tcf_result *res)
{ {
struct tc_action *a; struct tc_action *a;
int ret = -1; int ret = -1;
@ -473,7 +473,7 @@ errout:
} }
struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est,
char *name, int ovr, int bind, int *err) char *name, int ovr, int bind, int *err)
{ {
struct tc_action *a; struct tc_action *a;
struct tc_action_ops *a_o; struct tc_action_ops *a_o;
@ -553,7 +553,7 @@ err_out:
} }
struct tc_action *tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *tcf_action_init(struct rtattr *rta, struct rtattr *est,
char *name, int ovr, int bind, int *err) char *name, int ovr, int bind, int *err)
{ {
struct rtattr *tb[TCA_ACT_MAX_PRIO+1]; struct rtattr *tb[TCA_ACT_MAX_PRIO+1];
struct tc_action *head = NULL, *act, *act_prev = NULL; struct tc_action *head = NULL, *act, *act_prev = NULL;
@ -632,7 +632,7 @@ errout:
static int static int
tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
u16 flags, int event, int bind, int ref) u16 flags, int event, int bind, int ref)
{ {
struct tcamsg *t; struct tcamsg *t;
struct nlmsghdr *nlh; struct nlmsghdr *nlh;
@ -852,7 +852,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
} }
if (tca_get_fill(skb, head, pid, n->nlmsg_seq, 0, event, if (tca_get_fill(skb, head, pid, n->nlmsg_seq, 0, event,
0, 1) <= 0) { 0, 1) <= 0) {
kfree_skb(skb); kfree_skb(skb);
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
@ -861,7 +861,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
/* now do the delete */ /* now do the delete */
tcf_action_destroy(head, 0); tcf_action_destroy(head, 0);
ret = rtnetlink_send(skb, pid, RTNLGRP_TC, ret = rtnetlink_send(skb, pid, RTNLGRP_TC,
n->nlmsg_flags&NLM_F_ECHO); n->nlmsg_flags&NLM_F_ECHO);
if (ret > 0) if (ret > 0)
return 0; return 0;
return ret; return ret;
@ -872,7 +872,7 @@ err:
} }
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
u16 flags) u16 flags)
{ {
struct tcamsg *t; struct tcamsg *t;
struct nlmsghdr *nlh; struct nlmsghdr *nlh;
@ -999,13 +999,13 @@ find_dump_kind(struct nlmsghdr *n)
return NULL; return NULL;
if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(tb1), if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(tb1),
NLMSG_ALIGN(RTA_PAYLOAD(tb1))) < 0) NLMSG_ALIGN(RTA_PAYLOAD(tb1))) < 0)
return NULL; return NULL;
if (tb[0] == NULL) if (tb[0] == NULL)
return NULL; return NULL;
if (rtattr_parse(tb2, TCA_ACT_MAX, RTA_DATA(tb[0]), if (rtattr_parse(tb2, TCA_ACT_MAX, RTA_DATA(tb[0]),
RTA_PAYLOAD(tb[0])) < 0) RTA_PAYLOAD(tb[0])) < 0)
return NULL; return NULL;
kind = tb2[TCA_ACT_KIND-1]; kind = tb2[TCA_ACT_KIND-1];
@ -1043,7 +1043,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
} }
nlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, nlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
cb->nlh->nlmsg_type, sizeof(*t)); cb->nlh->nlmsg_type, sizeof(*t));
t = NLMSG_DATA(nlh); t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC; t->tca_family = AF_UNSPEC;
t->tca__pad1 = 0; t->tca__pad1 = 0;

View File

@ -65,7 +65,7 @@ static g_rand gact_rand[MAX_RAND]= { NULL, gact_net_rand, gact_determ };
#endif /* CONFIG_GACT_PROB */ #endif /* CONFIG_GACT_PROB */
static int tcf_gact_init(struct rtattr *rta, struct rtattr *est, static int tcf_gact_init(struct rtattr *rta, struct rtattr *est,
struct tc_action *a, int ovr, int bind) struct tc_action *a, int ovr, int bind)
{ {
struct rtattr *tb[TCA_GACT_MAX]; struct rtattr *tb[TCA_GACT_MAX];
struct tc_gact *parm; struct tc_gact *parm;

View File

@ -70,7 +70,7 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
} }
if (t->u.kernel.target->checkentry if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(table, NULL, && !t->u.kernel.target->checkentry(table, NULL,
t->u.kernel.target, t->data, t->u.kernel.target, t->data,
hook)) { hook)) {
module_put(t->u.kernel.target->me); module_put(t->u.kernel.target->me);
ret = -EINVAL; ret = -EINVAL;
@ -83,7 +83,7 @@ static void ipt_destroy_target(struct ipt_entry_target *t)
{ {
if (t->u.kernel.target->destroy) if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->u.kernel.target, t->data); t->u.kernel.target->destroy(t->u.kernel.target, t->data);
module_put(t->u.kernel.target->me); module_put(t->u.kernel.target->me);
} }
static int tcf_ipt_release(struct tcf_ipt *ipt, int bind) static int tcf_ipt_release(struct tcf_ipt *ipt, int bind)

View File

@ -154,7 +154,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
if (skb->len > tkey->at) { if (skb->len > tkey->at) {
char *j = pptr + tkey->at; char *j = pptr + tkey->at;
offset += ((*j & tkey->offmask) >> offset += ((*j & tkey->offmask) >>
tkey->shift); tkey->shift);
} else { } else {
goto bad; goto bad;
} }

View File

@ -62,7 +62,7 @@ struct tc_police_compat
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *cb, static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *cb,
int type, struct tc_action *a) int type, struct tc_action *a)
{ {
struct tcf_common *p; struct tcf_common *p;
int err = 0, index = -1, i = 0, s_i = 0, n_i = 0; int err = 0, index = -1, i = 0, s_i = 0, n_i = 0;
@ -135,7 +135,7 @@ void tcf_police_destroy(struct tcf_police *p)
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est, static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,
struct tc_action *a, int ovr, int bind) struct tc_action *a, int ovr, int bind)
{ {
unsigned h; unsigned h;
int ret = 0, err; int ret = 0, err;
@ -269,7 +269,7 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind)
} }
static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
struct tcf_result *res) struct tcf_result *res)
{ {
struct tcf_police *police = a->priv; struct tcf_police *police = a->priv;
psched_time_t now; psched_time_t now;

View File

@ -481,8 +481,8 @@ tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts)
int int
tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb, tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
struct rtattr *rate_tlv, struct tcf_exts *exts, struct rtattr *rate_tlv, struct tcf_exts *exts,
struct tcf_ext_map *map) struct tcf_ext_map *map)
{ {
memset(exts, 0, sizeof(*exts)); memset(exts, 0, sizeof(*exts));
@ -530,7 +530,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
void void
tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst,
struct tcf_exts *src) struct tcf_exts *src)
{ {
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
if (src->action) { if (src->action) {
@ -597,7 +597,7 @@ rtattr_failure: __attribute__ ((unused))
int int
tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts,
struct tcf_ext_map *map) struct tcf_ext_map *map)
{ {
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
if (exts->action) if (exts->action)

View File

@ -157,7 +157,7 @@ errout:
} }
static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
struct rtattr **tca, unsigned long *arg) struct rtattr **tca, unsigned long *arg)
{ {
int err = -EINVAL; int err = -EINVAL;
struct basic_head *head = (struct basic_head *) tp->root; struct basic_head *head = (struct basic_head *) tp->root;

View File

@ -316,12 +316,12 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
f = kzalloc(sizeof(*f), GFP_KERNEL); f = kzalloc(sizeof(*f), GFP_KERNEL);
if (!f) if (!f)
goto errout_alloc; goto errout_alloc;
} }
if (tb[TCA_TCINDEX_CLASSID-1]) { if (tb[TCA_TCINDEX_CLASSID-1]) {
cr.res.classid = *(u32 *) RTA_DATA(tb[TCA_TCINDEX_CLASSID-1]); cr.res.classid = *(u32 *) RTA_DATA(tb[TCA_TCINDEX_CLASSID-1]);
tcf_bind_filter(tp, &cr.res, base); tcf_bind_filter(tp, &cr.res, base);
} }
tcf_exts_change(tp, &cr.exts, &e); tcf_exts_change(tp, &cr.exts, &e);
@ -341,7 +341,7 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
for (fp = p->h+(handle % p->hash); *fp; fp = &(*fp)->next) for (fp = p->h+(handle % p->hash); *fp; fp = &(*fp)->next)
/* nothing */; /* nothing */;
*fp = f; *fp = f;
} }
tcf_tree_unlock(tp); tcf_tree_unlock(tp);
return 0; return 0;

View File

@ -596,7 +596,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
q = qdisc_leaf(p, clid); q = qdisc_leaf(p, clid);
} else { /* ingress */ } else { /* ingress */
q = dev->qdisc_ingress; q = dev->qdisc_ingress;
} }
} else { } else {
q = dev->qdisc_sleeping; q = dev->qdisc_sleeping;
} }
@ -743,7 +743,7 @@ create_n_graft:
return -ENOENT; return -ENOENT;
if (clid == TC_H_INGRESS) if (clid == TC_H_INGRESS)
q = qdisc_create(dev, tcm->tcm_parent, tca, &err); q = qdisc_create(dev, tcm->tcm_parent, tca, &err);
else else
q = qdisc_create(dev, tcm->tcm_handle, tca, &err); q = qdisc_create(dev, tcm->tcm_handle, tca, &err);
if (q == NULL) { if (q == NULL) {
if (err == -EAGAIN) if (err == -EAGAIN)

View File

@ -107,7 +107,7 @@ static __inline__ struct atm_flow_data *lookup_flow(struct Qdisc *sch,
struct atm_qdisc_data *p = PRIV(sch); struct atm_qdisc_data *p = PRIV(sch);
struct atm_flow_data *flow; struct atm_flow_data *flow;
for (flow = p->flows; flow; flow = flow->next) for (flow = p->flows; flow; flow = flow->next)
if (flow->classid == classid) break; if (flow->classid == classid) break;
return flow; return flow;
} }
@ -125,7 +125,7 @@ static int atm_tc_graft(struct Qdisc *sch,unsigned long arg,
if (!new) new = &noop_qdisc; if (!new) new = &noop_qdisc;
*old = xchg(&flow->q,new); *old = xchg(&flow->q,new);
if (*old) qdisc_reset(*old); if (*old) qdisc_reset(*old);
return 0; return 0;
} }
@ -145,7 +145,7 @@ static unsigned long atm_tc_get(struct Qdisc *sch,u32 classid)
DPRINTK("atm_tc_get(sch %p,[qdisc %p],classid %x)\n",sch,p,classid); DPRINTK("atm_tc_get(sch %p,[qdisc %p],classid %x)\n",sch,p,classid);
flow = lookup_flow(sch,classid); flow = lookup_flow(sch,classid);
if (flow) flow->ref++; if (flow) flow->ref++;
DPRINTK("atm_tc_get: flow %p\n",flow); DPRINTK("atm_tc_get: flow %p\n",flow);
return (unsigned long) flow; return (unsigned long) flow;
} }
@ -280,9 +280,9 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
opt->rta_type,RTA_PAYLOAD(opt),hdr_len); opt->rta_type,RTA_PAYLOAD(opt),hdr_len);
if (!(sock = sockfd_lookup(fd,&error))) return error; /* f_count++ */ if (!(sock = sockfd_lookup(fd,&error))) return error; /* f_count++ */
DPRINTK("atm_tc_change: f_count %d\n",file_count(sock->file)); DPRINTK("atm_tc_change: f_count %d\n",file_count(sock->file));
if (sock->ops->family != PF_ATMSVC && sock->ops->family != PF_ATMPVC) { if (sock->ops->family != PF_ATMSVC && sock->ops->family != PF_ATMPVC) {
error = -EPROTOTYPE; error = -EPROTOTYPE;
goto err_out; goto err_out;
} }
/* @@@ should check if the socket is really operational or we'll crash /* @@@ should check if the socket is really operational or we'll crash
on vcc->send */ on vcc->send */
@ -320,9 +320,9 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
flow->q = &noop_qdisc; flow->q = &noop_qdisc;
DPRINTK("atm_tc_change: qdisc %p\n",flow->q); DPRINTK("atm_tc_change: qdisc %p\n",flow->q);
flow->sock = sock; flow->sock = sock;
flow->vcc = ATM_SD(sock); /* speedup */ flow->vcc = ATM_SD(sock); /* speedup */
flow->vcc->user_back = flow; flow->vcc->user_back = flow;
DPRINTK("atm_tc_change: vcc %p\n",flow->vcc); DPRINTK("atm_tc_change: vcc %p\n",flow->vcc);
flow->old_pop = flow->vcc->pop; flow->old_pop = flow->vcc->pop;
flow->parent = p; flow->parent = p;
flow->vcc->pop = sch_atm_pop; flow->vcc->pop = sch_atm_pop;
@ -391,7 +391,7 @@ static struct tcf_proto **atm_tc_find_tcf(struct Qdisc *sch,unsigned long cl)
struct atm_flow_data *flow = (struct atm_flow_data *) cl; struct atm_flow_data *flow = (struct atm_flow_data *) cl;
DPRINTK("atm_tc_find_tcf(sch %p,[qdisc %p],flow %p)\n",sch,p,flow); DPRINTK("atm_tc_find_tcf(sch %p,[qdisc %p],flow %p)\n",sch,p,flow);
return flow ? &flow->filter_list : &p->link.filter_list; return flow ? &flow->filter_list : &p->link.filter_list;
} }
@ -546,8 +546,8 @@ static int atm_tc_requeue(struct sk_buff *skb,struct Qdisc *sch)
D2PRINTK("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); D2PRINTK("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p);
ret = p->link.q->ops->requeue(skb,p->link.q); ret = p->link.q->ops->requeue(skb,p->link.q);
if (!ret) { if (!ret) {
sch->q.qlen++; sch->q.qlen++;
sch->qstats.requeues++; sch->qstats.requeues++;
} else { } else {
sch->qstats.drops++; sch->qstats.drops++;
p->link.qstats.drops++; p->link.qstats.drops++;

View File

@ -40,12 +40,12 @@
======================================= =======================================
Sources: [1] Sally Floyd and Van Jacobson, "Link-sharing and Resource Sources: [1] Sally Floyd and Van Jacobson, "Link-sharing and Resource
Management Models for Packet Networks", Management Models for Packet Networks",
IEEE/ACM Transactions on Networking, Vol.3, No.4, 1995 IEEE/ACM Transactions on Networking, Vol.3, No.4, 1995
[2] Sally Floyd, "Notes on CBQ and Guaranteed Service", 1995 [2] Sally Floyd, "Notes on CBQ and Guaranteed Service", 1995
[3] Sally Floyd, "Notes on Class-Based Queueing: Setting [3] Sally Floyd, "Notes on Class-Based Queueing: Setting
Parameters", 1996 Parameters", 1996
[4] Sally Floyd and Michael Speer, "Experimental Results [4] Sally Floyd and Michael Speer, "Experimental Results
@ -59,12 +59,12 @@
the implementation is different. Particularly: the implementation is different. Particularly:
--- The WRR algorithm is different. Our version looks more --- The WRR algorithm is different. Our version looks more
reasonable (I hope) and works when quanta are allowed to be reasonable (I hope) and works when quanta are allowed to be
less than MTU, which is always the case when real time classes less than MTU, which is always the case when real time classes
have small rates. Note, that the statement of [3] is have small rates. Note, that the statement of [3] is
incomplete, delay may actually be estimated even if class incomplete, delay may actually be estimated even if class
per-round allotment is less than MTU. Namely, if per-round per-round allotment is less than MTU. Namely, if per-round
allotment is W*r_i, and r_1+...+r_k = r < 1 allotment is W*r_i, and r_1+...+r_k = r < 1
delay_i <= ([MTU/(W*r_i)]*W*r + W*r + k*MTU)/B delay_i <= ([MTU/(W*r_i)]*W*r + W*r + k*MTU)/B
@ -768,7 +768,7 @@ cbq_update(struct cbq_sched_data *q)
(now - last) is total time between packet right edges. (now - last) is total time between packet right edges.
(last_pktlen/rate) is "virtual" busy time, so that (last_pktlen/rate) is "virtual" busy time, so that
idle = (now - last) - last_pktlen/rate idle = (now - last) - last_pktlen/rate
*/ */
idle = PSCHED_TDIFF(q->now, cl->last); idle = PSCHED_TDIFF(q->now, cl->last);

View File

@ -100,7 +100,7 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg,
qdisc_reset(*old); qdisc_reset(*old);
sch_tree_unlock(sch); sch_tree_unlock(sch);
return 0; return 0;
} }
static struct Qdisc *dsmark_leaf(struct Qdisc *sch, unsigned long arg) static struct Qdisc *dsmark_leaf(struct Qdisc *sch, unsigned long arg)
@ -195,7 +195,7 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker)
} }
ignore: ignore:
walker->count++; walker->count++;
} }
} }
static struct tcf_proto **dsmark_find_tcf(struct Qdisc *sch,unsigned long cl) static struct tcf_proto **dsmark_find_tcf(struct Qdisc *sch,unsigned long cl)

View File

@ -82,7 +82,7 @@ void qdisc_unlock_tree(struct net_device *dev)
we do not check dev->tbusy flag here. we do not check dev->tbusy flag here.
Returns: 0 - queue is empty. Returns: 0 - queue is empty.
>0 - queue is not empty, but throttled. >0 - queue is not empty, but throttled.
<0 - queue is not empty. Device is throttled, if dev->tbusy != 0. <0 - queue is not empty. Device is throttled, if dev->tbusy != 0.
NOTE: Called under dev->queue_lock with locally disabled BH. NOTE: Called under dev->queue_lock with locally disabled BH.
@ -600,10 +600,10 @@ void dev_shutdown(struct net_device *dev)
dev->qdisc_sleeping = &noop_qdisc; dev->qdisc_sleeping = &noop_qdisc;
qdisc_destroy(qdisc); qdisc_destroy(qdisc);
#if defined(CONFIG_NET_SCH_INGRESS) || defined(CONFIG_NET_SCH_INGRESS_MODULE) #if defined(CONFIG_NET_SCH_INGRESS) || defined(CONFIG_NET_SCH_INGRESS_MODULE)
if ((qdisc = dev->qdisc_ingress) != NULL) { if ((qdisc = dev->qdisc_ingress) != NULL) {
dev->qdisc_ingress = NULL; dev->qdisc_ingress = NULL;
qdisc_destroy(qdisc); qdisc_destroy(qdisc);
} }
#endif #endif
BUG_TRAP(!timer_pending(&dev->watchdog_timer)); BUG_TRAP(!timer_pending(&dev->watchdog_timer));
qdisc_unlock_tree(dev); qdisc_unlock_tree(dev);

View File

@ -335,7 +335,7 @@ static void gred_reset(struct Qdisc* sch)
qdisc_reset_queue(sch); qdisc_reset_queue(sch);
for (i = 0; i < t->DPs; i++) { for (i = 0; i < t->DPs; i++) {
struct gred_sched_data *q = t->tab[i]; struct gred_sched_data *q = t->tab[i];
if (!q) if (!q)
@ -393,7 +393,7 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct rtattr *dps)
"shadowed VQ 0x%x\n", i); "shadowed VQ 0x%x\n", i);
gred_destroy_vq(table->tab[i]); gred_destroy_vq(table->tab[i]);
table->tab[i] = NULL; table->tab[i] = NULL;
} }
} }
return 0; return 0;

View File

@ -773,7 +773,7 @@ init_vf(struct hfsc_class *cl, unsigned int len)
/* update the virtual curve */ /* update the virtual curve */
vt = cl->cl_vt + cl->cl_vtoff; vt = cl->cl_vt + cl->cl_vtoff;
rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt, rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt,
cl->cl_total); cl->cl_total);
if (cl->cl_virtual.x == vt) { if (cl->cl_virtual.x == vt) {
cl->cl_virtual.x -= cl->cl_vtoff; cl->cl_virtual.x -= cl->cl_vtoff;
cl->cl_vtoff = 0; cl->cl_vtoff = 0;
@ -796,10 +796,10 @@ init_vf(struct hfsc_class *cl, unsigned int len)
/* update the ulimit curve */ /* update the ulimit curve */
rtsc_min(&cl->cl_ulimit, &cl->cl_usc, cur_time, rtsc_min(&cl->cl_ulimit, &cl->cl_usc, cur_time,
cl->cl_total); cl->cl_total);
/* compute myf */ /* compute myf */
cl->cl_myf = rtsc_y2x(&cl->cl_ulimit, cl->cl_myf = rtsc_y2x(&cl->cl_ulimit,
cl->cl_total); cl->cl_total);
cl->cl_myfadj = 0; cl->cl_myfadj = 0;
} }
} }
@ -853,7 +853,7 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time)
* update vt and f * update vt and f
*/ */
cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total) cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total)
- cl->cl_vtoff + cl->cl_vtadj; - cl->cl_vtoff + cl->cl_vtadj;
/* /*
* if vt of the class is smaller than cvtmin, * if vt of the class is smaller than cvtmin,
@ -870,7 +870,7 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time)
if (cl->cl_flags & HFSC_USC) { if (cl->cl_flags & HFSC_USC) {
cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit, cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit,
cl->cl_total); cl->cl_total);
#if 0 #if 0
/* /*
* This code causes classes to stay way under their * This code causes classes to stay way under their
@ -1001,7 +1001,7 @@ hfsc_find_class(u32 classid, struct Qdisc *sch)
static void static void
hfsc_change_rsc(struct hfsc_class *cl, struct tc_service_curve *rsc, hfsc_change_rsc(struct hfsc_class *cl, struct tc_service_curve *rsc,
u64 cur_time) u64 cur_time)
{ {
sc2isc(rsc, &cl->cl_rsc); sc2isc(rsc, &cl->cl_rsc);
rtsc_init(&cl->cl_deadline, &cl->cl_rsc, cur_time, cl->cl_cumul); rtsc_init(&cl->cl_deadline, &cl->cl_rsc, cur_time, cl->cl_cumul);
@ -1023,7 +1023,7 @@ hfsc_change_fsc(struct hfsc_class *cl, struct tc_service_curve *fsc)
static void static void
hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc, hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc,
u64 cur_time) u64 cur_time)
{ {
sc2isc(usc, &cl->cl_usc); sc2isc(usc, &cl->cl_usc);
rtsc_init(&cl->cl_ulimit, &cl->cl_usc, cur_time, cl->cl_total); rtsc_init(&cl->cl_ulimit, &cl->cl_usc, cur_time, cl->cl_total);
@ -1032,7 +1032,7 @@ hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc,
static int static int
hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
struct rtattr **tca, unsigned long *arg) struct rtattr **tca, unsigned long *arg)
{ {
struct hfsc_sched *q = qdisc_priv(sch); struct hfsc_sched *q = qdisc_priv(sch);
struct hfsc_class *cl = (struct hfsc_class *)*arg; struct hfsc_class *cl = (struct hfsc_class *)*arg;
@ -1259,7 +1259,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
static int static int
hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
struct Qdisc **old) struct Qdisc **old)
{ {
struct hfsc_class *cl = (struct hfsc_class *)arg; struct hfsc_class *cl = (struct hfsc_class *)arg;
@ -1397,7 +1397,7 @@ hfsc_dump_curves(struct sk_buff *skb, struct hfsc_class *cl)
static int static int
hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb,
struct tcmsg *tcm) struct tcmsg *tcm)
{ {
struct hfsc_class *cl = (struct hfsc_class *)arg; struct hfsc_class *cl = (struct hfsc_class *)arg;
unsigned char *b = skb->tail; unsigned char *b = skb->tail;

View File

@ -1229,7 +1229,7 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
if (cl && !cl->level) { if (cl && !cl->level) {
if (new == NULL && if (new == NULL &&
(new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, (new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops,
cl->classid)) cl->classid))
== NULL) == NULL)
return -ENOBUFS; return -ENOBUFS;
sch_tree_lock(sch); sch_tree_lock(sch);

View File

@ -70,7 +70,7 @@ static int ingress_graft(struct Qdisc *sch,unsigned long arg,
DPRINTK("ingress_graft(sch %p,[qdisc %p],new %p,old %p)\n", DPRINTK("ingress_graft(sch %p,[qdisc %p],new %p,old %p)\n",
sch, p, new, old); sch, p, new, old);
DPRINTK("\n ingress_graft: You cannot add qdiscs to classes"); DPRINTK("\n ingress_graft: You cannot add qdiscs to classes");
return 1; return 1;
} }
@ -232,14 +232,14 @@ static unsigned int ingress_drop(struct Qdisc *sch)
#ifdef CONFIG_NETFILTER #ifdef CONFIG_NETFILTER
static unsigned int static unsigned int
ing_hook(unsigned int hook, struct sk_buff **pskb, ing_hook(unsigned int hook, struct sk_buff **pskb,
const struct net_device *indev, const struct net_device *indev,
const struct net_device *outdev, const struct net_device *outdev,
int (*okfn)(struct sk_buff *)) int (*okfn)(struct sk_buff *))
{ {
struct Qdisc *q; struct Qdisc *q;
struct sk_buff *skb = *pskb; struct sk_buff *skb = *pskb;
struct net_device *dev = skb->dev; struct net_device *dev = skb->dev;
int fwres=NF_ACCEPT; int fwres=NF_ACCEPT;
DPRINTK("ing_hook: skb %s dev=%s len=%u\n", DPRINTK("ing_hook: skb %s dev=%s len=%u\n",
@ -257,7 +257,7 @@ used on the egress (might slow things for an iota)
if ((q = dev->qdisc_ingress) != NULL) if ((q = dev->qdisc_ingress) != NULL)
fwres = q->enqueue(skb, q); fwres = q->enqueue(skb, q);
spin_unlock(&dev->queue_lock); spin_unlock(&dev->queue_lock);
} }
return fwres; return fwres;
} }

View File

@ -323,7 +323,7 @@ static void netem_reset(struct Qdisc *sch)
/* Pass size change message down to embedded FIFO */ /* Pass size change message down to embedded FIFO */
static int set_fifo_limit(struct Qdisc *q, int limit) static int set_fifo_limit(struct Qdisc *q, int limit)
{ {
struct rtattr *rta; struct rtattr *rta;
int ret = -ENOMEM; int ret = -ENOMEM;
/* Hack to avoid sending change message to non-FIFO */ /* Hack to avoid sending change message to non-FIFO */

View File

@ -185,7 +185,7 @@ static struct Qdisc *red_create_dflt(struct Qdisc *sch, u32 limit)
TC_H_MAKE(sch->handle, 1)); TC_H_MAKE(sch->handle, 1));
if (q) { if (q) {
rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)),
GFP_KERNEL); GFP_KERNEL);
if (rta) { if (rta) {
rta->rta_type = RTM_NEWQDISC; rta->rta_type = RTM_NEWQDISC;
rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt));

View File

@ -276,7 +276,7 @@ static void tbf_reset(struct Qdisc* sch)
static struct Qdisc *tbf_create_dflt_qdisc(struct Qdisc *sch, u32 limit) static struct Qdisc *tbf_create_dflt_qdisc(struct Qdisc *sch, u32 limit)
{ {
struct Qdisc *q; struct Qdisc *q;
struct rtattr *rta; struct rtattr *rta;
int ret; int ret;
q = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops, q = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops,