[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 коммит произвёл David S. Miller
Родитель 7612713fb6
Коммит 10297b9931
33 изменённых файлов: 207 добавлений и 207 удалений

Просмотреть файл

@ -65,7 +65,7 @@ int tcf_hash_release(struct tcf_common *p, int bind,
p->tcfc_bindcnt--;
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);
ret = 1;
}
@ -362,7 +362,7 @@ static struct tc_action_ops *tc_lookup_action_id(u32 type)
#endif
int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
struct tcf_result *res)
struct tcf_result *res)
{
struct tc_action *a;
int ret = -1;
@ -473,7 +473,7 @@ errout:
}
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_ops *a_o;
@ -553,7 +553,7 @@ err_out:
}
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 tc_action *head = NULL, *act, *act_prev = NULL;
@ -632,7 +632,7 @@ errout:
static int
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 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,
0, 1) <= 0) {
0, 1) <= 0) {
kfree_skb(skb);
ret = -EINVAL;
goto err;
@ -861,7 +861,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
/* now do the delete */
tcf_action_destroy(head, 0);
ret = rtnetlink_send(skb, pid, RTNLGRP_TC,
n->nlmsg_flags&NLM_F_ECHO);
n->nlmsg_flags&NLM_F_ECHO);
if (ret > 0)
return 0;
return ret;
@ -872,7 +872,7 @@ err:
}
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
u16 flags)
u16 flags)
{
struct tcamsg *t;
struct nlmsghdr *nlh;
@ -999,13 +999,13 @@ find_dump_kind(struct nlmsghdr *n)
return NULL;
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;
if (tb[0] == NULL)
return NULL;
if (rtattr_parse(tb2, TCA_ACT_MAX, RTA_DATA(tb[0]),
RTA_PAYLOAD(tb[0])) < 0)
RTA_PAYLOAD(tb[0])) < 0)
return NULL;
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,
cb->nlh->nlmsg_type, sizeof(*t));
cb->nlh->nlmsg_type, sizeof(*t));
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
t->tca__pad1 = 0;

Просмотреть файл

@ -65,7 +65,7 @@ static g_rand gact_rand[MAX_RAND]= { NULL, gact_net_rand, gact_determ };
#endif /* CONFIG_GACT_PROB */
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 tc_gact *parm;

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -62,7 +62,7 @@ struct tc_police_compat
#ifdef CONFIG_NET_CLS_ACT
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;
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
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;
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,
struct tcf_result *res)
struct tcf_result *res)
{
struct tcf_police *police = a->priv;
psched_time_t now;

Просмотреть файл

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

Просмотреть файл

@ -157,7 +157,7 @@ errout:
}
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;
struct basic_head *head = (struct basic_head *) tp->root;

Просмотреть файл

@ -316,12 +316,12 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
f = kzalloc(sizeof(*f), GFP_KERNEL);
if (!f)
goto errout_alloc;
}
}
if (tb[TCA_TCINDEX_CLASSID-1]) {
cr.res.classid = *(u32 *) RTA_DATA(tb[TCA_TCINDEX_CLASSID-1]);
tcf_bind_filter(tp, &cr.res, base);
}
}
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)
/* nothing */;
*fp = f;
}
}
tcf_tree_unlock(tp);
return 0;

Просмотреть файл

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

Просмотреть файл

@ -107,7 +107,7 @@ static __inline__ struct atm_flow_data *lookup_flow(struct Qdisc *sch,
struct atm_qdisc_data *p = PRIV(sch);
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;
return flow;
}
@ -125,7 +125,7 @@ static int atm_tc_graft(struct Qdisc *sch,unsigned long arg,
if (!new) new = &noop_qdisc;
*old = xchg(&flow->q,new);
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);
flow = lookup_flow(sch,classid);
if (flow) flow->ref++;
if (flow) flow->ref++;
DPRINTK("atm_tc_get: flow %p\n",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);
if (!(sock = sockfd_lookup(fd,&error))) return error; /* f_count++ */
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;
goto err_out;
goto err_out;
}
/* @@@ should check if the socket is really operational or we'll crash
on vcc->send */
@ -320,9 +320,9 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
flow->q = &noop_qdisc;
DPRINTK("atm_tc_change: qdisc %p\n",flow->q);
flow->sock = sock;
flow->vcc = ATM_SD(sock); /* speedup */
flow->vcc = ATM_SD(sock); /* speedup */
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->parent = p;
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;
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);
ret = p->link.q->ops->requeue(skb,p->link.q);
if (!ret) {
sch->q.qlen++;
sch->qstats.requeues++;
sch->q.qlen++;
sch->qstats.requeues++;
} else {
sch->qstats.drops++;
p->link.qstats.drops++;

Просмотреть файл

@ -40,12 +40,12 @@
=======================================
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
[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
[4] Sally Floyd and Michael Speer, "Experimental Results
@ -59,12 +59,12 @@
the implementation is different. Particularly:
--- The WRR algorithm is different. Our version looks more
reasonable (I hope) and works when quanta are allowed to be
less than MTU, which is always the case when real time classes
have small rates. Note, that the statement of [3] is
incomplete, delay may actually be estimated even if class
per-round allotment is less than MTU. Namely, if per-round
allotment is W*r_i, and r_1+...+r_k = r < 1
reasonable (I hope) and works when quanta are allowed to be
less than MTU, which is always the case when real time classes
have small rates. Note, that the statement of [3] is
incomplete, delay may actually be estimated even if class
per-round allotment is less than MTU. Namely, if per-round
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
@ -768,7 +768,7 @@ cbq_update(struct cbq_sched_data *q)
(now - last) is total time between packet right edges.
(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);

Просмотреть файл

@ -100,7 +100,7 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg,
qdisc_reset(*old);
sch_tree_unlock(sch);
return 0;
return 0;
}
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:
walker->count++;
}
}
}
static struct tcf_proto **dsmark_find_tcf(struct Qdisc *sch,unsigned long cl)

Просмотреть файл

@ -82,7 +82,7 @@ void qdisc_unlock_tree(struct net_device *dev)
we do not check dev->tbusy flag here.
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.
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;
qdisc_destroy(qdisc);
#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;
qdisc_destroy(qdisc);
}
}
#endif
BUG_TRAP(!timer_pending(&dev->watchdog_timer));
qdisc_unlock_tree(dev);

Просмотреть файл

@ -335,7 +335,7 @@ static void gred_reset(struct Qdisc* 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];
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);
gred_destroy_vq(table->tab[i]);
table->tab[i] = NULL;
}
}
}
return 0;

Просмотреть файл

@ -773,7 +773,7 @@ init_vf(struct hfsc_class *cl, unsigned int len)
/* update the virtual curve */
vt = cl->cl_vt + cl->cl_vtoff;
rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt,
cl->cl_total);
cl->cl_total);
if (cl->cl_virtual.x == vt) {
cl->cl_virtual.x -= cl->cl_vtoff;
cl->cl_vtoff = 0;
@ -796,10 +796,10 @@ init_vf(struct hfsc_class *cl, unsigned int len)
/* update the ulimit curve */
rtsc_min(&cl->cl_ulimit, &cl->cl_usc, cur_time,
cl->cl_total);
cl->cl_total);
/* compute myf */
cl->cl_myf = rtsc_y2x(&cl->cl_ulimit,
cl->cl_total);
cl->cl_total);
cl->cl_myfadj = 0;
}
}
@ -853,7 +853,7 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time)
* update vt and f
*/
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,
@ -870,7 +870,7 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time)
if (cl->cl_flags & HFSC_USC) {
cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit,
cl->cl_total);
cl->cl_total);
#if 0
/*
* This code causes classes to stay way under their
@ -1001,7 +1001,7 @@ hfsc_find_class(u32 classid, struct Qdisc *sch)
static void
hfsc_change_rsc(struct hfsc_class *cl, struct tc_service_curve *rsc,
u64 cur_time)
u64 cur_time)
{
sc2isc(rsc, &cl->cl_rsc);
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
hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc,
u64 cur_time)
u64 cur_time)
{
sc2isc(usc, &cl->cl_usc);
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
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_class *cl = (struct hfsc_class *)*arg;
@ -1259,7 +1259,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
static int
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;
@ -1397,7 +1397,7 @@ hfsc_dump_curves(struct sk_buff *skb, struct hfsc_class *cl)
static int
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;
unsigned char *b = skb->tail;

Просмотреть файл

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

Просмотреть файл

@ -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",
sch, p, new, old);
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
static unsigned int
ing_hook(unsigned int hook, struct sk_buff **pskb,
const struct net_device *indev,
const struct net_device *outdev,
int (*okfn)(struct sk_buff *))
const struct net_device *indev,
const struct net_device *outdev,
int (*okfn)(struct sk_buff *))
{
struct Qdisc *q;
struct sk_buff *skb = *pskb;
struct net_device *dev = skb->dev;
struct net_device *dev = skb->dev;
int fwres=NF_ACCEPT;
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)
fwres = q->enqueue(skb, q);
spin_unlock(&dev->queue_lock);
}
}
return fwres;
}

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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