You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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:
committed by
David S. Miller
parent
7612713fb6
commit
10297b9931
+17
-17
@@ -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;
|
||||
@@ -590,7 +590,7 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
|
||||
int err = 0;
|
||||
struct gnet_dump d;
|
||||
struct tcf_act_hdr *h = a->priv;
|
||||
|
||||
|
||||
if (h == NULL)
|
||||
goto errout;
|
||||
|
||||
@@ -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;
|
||||
@@ -645,7 +645,7 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
|
||||
t->tca_family = AF_UNSPEC;
|
||||
t->tca__pad1 = 0;
|
||||
t->tca__pad2 = 0;
|
||||
|
||||
|
||||
x = (struct rtattr*) skb->tail;
|
||||
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);
|
||||
|
||||
@@ -653,7 +653,7 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
|
||||
goto rtattr_failure;
|
||||
|
||||
x->rta_len = skb->tail - (u8*)x;
|
||||
|
||||
|
||||
nlh->nlmsg_len = skb->tail - b;
|
||||
return skb->len;
|
||||
|
||||
@@ -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;
|
||||
@@ -900,10 +900,10 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
|
||||
goto rtattr_failure;
|
||||
|
||||
x->rta_len = skb->tail - (u8*)x;
|
||||
|
||||
|
||||
nlh->nlmsg_len = skb->tail - b;
|
||||
NETLINK_CB(skb).dst_group = RTNLGRP_TC;
|
||||
|
||||
|
||||
err = rtnetlink_send(skb, pid, RTNLGRP_TC, flags&NLM_F_ECHO);
|
||||
if (err > 0)
|
||||
err = 0;
|
||||
@@ -915,7 +915,7 @@ nlmsg_failure:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr)
|
||||
{
|
||||
@@ -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;
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
@@ -153,8 +153,8 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
|
||||
if (tkey->offmask) {
|
||||
if (skb->len > tkey->at) {
|
||||
char *j = pptr + tkey->at;
|
||||
offset += ((*j & tkey->offmask) >>
|
||||
tkey->shift);
|
||||
offset += ((*j & tkey->offmask) >>
|
||||
tkey->shift);
|
||||
} else {
|
||||
goto bad;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
|
||||
*ptr = ((*ptr & tkey->mask) ^ tkey->val);
|
||||
munged++;
|
||||
}
|
||||
|
||||
|
||||
if (munged)
|
||||
skb->tc_verd = SET_TC_MUNGED(skb->tc_verd);
|
||||
goto done;
|
||||
@@ -200,8 +200,8 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,
|
||||
struct tcf_pedit *p = a->priv;
|
||||
struct tc_pedit *opt;
|
||||
struct tcf_t t;
|
||||
int s;
|
||||
|
||||
int s;
|
||||
|
||||
s = sizeof(*opt) + p->tcfp_nkeys * sizeof(struct tc_pedit_key);
|
||||
|
||||
/* netlink spinlocks held above us - must use ATOMIC */
|
||||
|
||||
@@ -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;
|
||||
@@ -112,7 +112,7 @@ void tcf_police_destroy(struct tcf_police *p)
|
||||
{
|
||||
unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK);
|
||||
struct tcf_common **p1p;
|
||||
|
||||
|
||||
for (p1p = &tcf_police_ht[h]; *p1p; p1p = &(*p1p)->tcfc_next) {
|
||||
if (*p1p == &p->common) {
|
||||
write_lock_bh(&police_lock);
|
||||
@@ -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;
|
||||
@@ -606,12 +606,12 @@ rtattr_failure:
|
||||
int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *police)
|
||||
{
|
||||
struct gnet_dump d;
|
||||
|
||||
|
||||
if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
|
||||
TCA_XSTATS, police->tcf_stats_lock,
|
||||
&d) < 0)
|
||||
goto errout;
|
||||
|
||||
|
||||
if (gnet_stats_copy_basic(&d, &police->tcf_bstats) < 0 ||
|
||||
#ifdef CONFIG_NET_ESTIMATOR
|
||||
gnet_stats_copy_rate_est(&d, &police->tcf_rate_est) < 0 ||
|
||||
|
||||
@@ -43,9 +43,9 @@ static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result
|
||||
d->tcf_bstats.bytes += skb->len;
|
||||
d->tcf_bstats.packets++;
|
||||
|
||||
/* print policy string followed by _ then packet count
|
||||
* Example if this was the 3rd packet and the string was "hello"
|
||||
* then it would look like "hello_3" (without quotes)
|
||||
/* print policy string followed by _ then packet count
|
||||
* Example if this was the 3rd packet and the string was "hello"
|
||||
* then it would look like "hello_3" (without quotes)
|
||||
**/
|
||||
printk("simple: %s_%d\n",
|
||||
(char *)d->tcfd_defdata, d->tcf_bstats.packets);
|
||||
|
||||
+7
-7
@@ -286,7 +286,7 @@ replay:
|
||||
goto errout;
|
||||
} else {
|
||||
switch (n->nlmsg_type) {
|
||||
case RTM_NEWTFILTER:
|
||||
case RTM_NEWTFILTER:
|
||||
err = -EEXIST;
|
||||
if (n->nlmsg_flags&NLM_F_EXCL)
|
||||
goto errout;
|
||||
@@ -481,11 +481,11 @@ 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));
|
||||
|
||||
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
{
|
||||
int err;
|
||||
@@ -511,7 +511,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
|
||||
#elif defined CONFIG_NET_CLS_POLICE
|
||||
if (map->police && tb[map->police-1]) {
|
||||
struct tcf_police *p;
|
||||
|
||||
|
||||
p = tcf_police_locate(tb[map->police-1], rate_tlv);
|
||||
if (p == NULL)
|
||||
return -EINVAL;
|
||||
@@ -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)
|
||||
|
||||
@@ -98,7 +98,7 @@ static void basic_destroy(struct tcf_proto *tp)
|
||||
{
|
||||
struct basic_head *head = (struct basic_head *) xchg(&tp->root, NULL);
|
||||
struct basic_filter *f, *n;
|
||||
|
||||
|
||||
list_for_each_entry_safe(f, n, &head->flist, link) {
|
||||
list_del(&f->link);
|
||||
basic_delete_filter(tp, f);
|
||||
@@ -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;
|
||||
@@ -292,7 +292,7 @@ static int __init init_basic(void)
|
||||
return register_tcf_proto_ops(&cls_basic_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_basic(void)
|
||||
static void __exit exit_basic(void)
|
||||
{
|
||||
unregister_tcf_proto_ops(&cls_basic_ops);
|
||||
}
|
||||
|
||||
+2
-2
@@ -91,7 +91,7 @@ static __inline__ int fw_hash(u32 handle)
|
||||
else if (HTSIZE == 256) {
|
||||
u8 *t = (u8 *) &handle;
|
||||
return t[0] ^ t[1] ^ t[2] ^ t[3];
|
||||
} else
|
||||
} else
|
||||
return handle & (HTSIZE - 1);
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ static int __init init_fw(void)
|
||||
return register_tcf_proto_ops(&cls_fw_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_fw(void)
|
||||
static void __exit exit_fw(void)
|
||||
{
|
||||
unregister_tcf_proto_ops(&cls_fw_ops);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ static struct tcf_ext_map rsvp_ext_map = {
|
||||
else if (r > 0) \
|
||||
return r; \
|
||||
}
|
||||
|
||||
|
||||
static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
|
||||
struct tcf_result *res)
|
||||
{
|
||||
@@ -347,7 +347,7 @@ static int tunnel_bts(struct rsvp_head *data)
|
||||
{
|
||||
int n = data->tgenerator>>5;
|
||||
u32 b = 1<<(data->tgenerator&0x1F);
|
||||
|
||||
|
||||
if (data->tmap[n]&b)
|
||||
return 0;
|
||||
data->tmap[n] |= b;
|
||||
@@ -547,7 +547,7 @@ insert:
|
||||
s->next = *sp;
|
||||
wmb();
|
||||
*sp = s;
|
||||
|
||||
|
||||
goto insert;
|
||||
|
||||
errout:
|
||||
@@ -654,7 +654,7 @@ static int __init init_rsvp(void)
|
||||
return register_tcf_proto_ops(&RSVP_OPS);
|
||||
}
|
||||
|
||||
static void __exit exit_rsvp(void)
|
||||
static void __exit exit_rsvp(void)
|
||||
{
|
||||
unregister_tcf_proto_ops(&RSVP_OPS);
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
|
||||
err = tcf_exts_validate(tp, tb, est, &e, &tcindex_ext_map);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
||||
memcpy(&cp, p, sizeof(cp));
|
||||
memset(&new_filter_result, 0, sizeof(new_filter_result));
|
||||
|
||||
@@ -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;
|
||||
@@ -491,7 +491,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh,
|
||||
if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0)
|
||||
goto rtattr_failure;
|
||||
}
|
||||
|
||||
|
||||
return skb->len;
|
||||
|
||||
rtattr_failure:
|
||||
@@ -519,7 +519,7 @@ static int __init init_tcindex(void)
|
||||
return register_tcf_proto_ops(&cls_tcindex_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_tcindex(void)
|
||||
static void __exit exit_tcindex(void)
|
||||
{
|
||||
unregister_tcf_proto_ops(&cls_tcindex_ops);
|
||||
}
|
||||
|
||||
+2
-2
@@ -760,7 +760,7 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh,
|
||||
RTA_PUT(skb, TCA_U32_INDEV, IFNAMSIZ, n->indev);
|
||||
#endif
|
||||
#ifdef CONFIG_CLS_U32_PERF
|
||||
RTA_PUT(skb, TCA_U32_PCNT,
|
||||
RTA_PUT(skb, TCA_U32_PCNT,
|
||||
sizeof(struct tc_u32_pcnt) + n->sel.nkeys*sizeof(u64),
|
||||
n->pf);
|
||||
#endif
|
||||
@@ -810,7 +810,7 @@ static int __init init_u32(void)
|
||||
return register_tcf_proto_ops(&cls_u32_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_u32(void)
|
||||
static void __exit exit_u32(void)
|
||||
{
|
||||
unregister_tcf_proto_ops(&cls_u32_ops);
|
||||
}
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ static int __init init_em_cmp(void)
|
||||
return tcf_em_register(&em_cmp_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_em_cmp(void)
|
||||
static void __exit exit_em_cmp(void)
|
||||
{
|
||||
tcf_em_unregister(&em_cmp_ops);
|
||||
}
|
||||
|
||||
+6
-6
@@ -9,7 +9,7 @@
|
||||
* Authors: Thomas Graf <tgraf@suug.ch>
|
||||
*
|
||||
* ==========================================================================
|
||||
*
|
||||
*
|
||||
* The metadata ematch compares two meta objects where each object
|
||||
* represents either a meta value stored in the kernel or a static
|
||||
* value provided by userspace. The objects are not provided by
|
||||
@@ -290,7 +290,7 @@ META_COLLECTOR(var_sk_bound_if)
|
||||
dst->len = 3;
|
||||
} else {
|
||||
struct net_device *dev;
|
||||
|
||||
|
||||
dev = dev_get_by_index(skb->sk->sk_bound_dev_if);
|
||||
*err = var_dev(dev, dst);
|
||||
if (dev)
|
||||
@@ -671,7 +671,7 @@ static inline struct meta_type_ops * meta_type_ops(struct meta_value *v)
|
||||
* Core
|
||||
**************************************************************************/
|
||||
|
||||
static inline int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info,
|
||||
static inline int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info,
|
||||
struct meta_value *v, struct meta_obj *dst)
|
||||
{
|
||||
int err = 0;
|
||||
@@ -753,7 +753,7 @@ static int em_meta_change(struct tcf_proto *tp, void *data, int len,
|
||||
struct rtattr *tb[TCA_EM_META_MAX];
|
||||
struct tcf_meta_hdr *hdr;
|
||||
struct meta_match *meta = NULL;
|
||||
|
||||
|
||||
if (rtattr_parse(tb, TCA_EM_META_MAX, data, len) < 0)
|
||||
goto errout;
|
||||
|
||||
@@ -822,7 +822,7 @@ static int em_meta_dump(struct sk_buff *skb, struct tcf_ematch *em)
|
||||
|
||||
rtattr_failure:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static struct tcf_ematch_ops em_meta_ops = {
|
||||
.kind = TCF_EM_META,
|
||||
@@ -839,7 +839,7 @@ static int __init init_em_meta(void)
|
||||
return tcf_em_register(&em_meta_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_em_meta(void)
|
||||
static void __exit exit_em_meta(void)
|
||||
{
|
||||
tcf_em_unregister(&em_meta_ops);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ struct nbyte_data
|
||||
struct tcf_em_nbyte hdr;
|
||||
char pattern[0];
|
||||
};
|
||||
|
||||
|
||||
static int em_nbyte_change(struct tcf_proto *tp, void *data, int data_len,
|
||||
struct tcf_ematch *em)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ static int __init init_em_nbyte(void)
|
||||
return tcf_em_register(&em_nbyte_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_em_nbyte(void)
|
||||
static void __exit exit_em_nbyte(void)
|
||||
{
|
||||
tcf_em_unregister(&em_nbyte_ops);
|
||||
}
|
||||
|
||||
+2
-2
@@ -125,7 +125,7 @@ static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m)
|
||||
|
||||
rtattr_failure:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static struct tcf_ematch_ops em_text_ops = {
|
||||
.kind = TCF_EM_TEXT,
|
||||
@@ -142,7 +142,7 @@ static int __init init_em_text(void)
|
||||
return tcf_em_register(&em_text_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_em_text(void)
|
||||
static void __exit exit_em_text(void)
|
||||
{
|
||||
tcf_em_unregister(&em_text_ops);
|
||||
}
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ static int em_u32_match(struct sk_buff *skb, struct tcf_ematch *em,
|
||||
{
|
||||
struct tc_u32_key *key = (struct tc_u32_key *) em->data;
|
||||
unsigned char *ptr = skb->nh.raw;
|
||||
|
||||
|
||||
if (info) {
|
||||
if (info->ptr)
|
||||
ptr = info->ptr;
|
||||
@@ -34,7 +34,7 @@ static int em_u32_match(struct sk_buff *skb, struct tcf_ematch *em,
|
||||
|
||||
if (!tcf_valid_offset(skb, ptr, sizeof(u32)))
|
||||
return 0;
|
||||
|
||||
|
||||
return !(((*(u32*) ptr) ^ key->val) & key->mask);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ static int __init init_em_u32(void)
|
||||
return tcf_em_register(&em_u32_ops);
|
||||
}
|
||||
|
||||
static void __exit exit_em_u32(void)
|
||||
static void __exit exit_em_u32(void)
|
||||
{
|
||||
tcf_em_unregister(&em_u32_ops);
|
||||
}
|
||||
|
||||
+6
-6
@@ -37,12 +37,12 @@
|
||||
* --------<-POP---------
|
||||
*
|
||||
* where B is a virtual ematch referencing to sequence starting with B1.
|
||||
*
|
||||
*
|
||||
* ==========================================================================
|
||||
*
|
||||
* How to write an ematch in 60 seconds
|
||||
* ------------------------------------
|
||||
*
|
||||
*
|
||||
* 1) Provide a matcher function:
|
||||
* static int my_match(struct sk_buff *skb, struct tcf_ematch *m,
|
||||
* struct tcf_pkt_info *info)
|
||||
@@ -115,7 +115,7 @@ static inline struct tcf_ematch_ops * tcf_em_lookup(u16 kind)
|
||||
|
||||
/**
|
||||
* tcf_em_register - register an extended match
|
||||
*
|
||||
*
|
||||
* @ops: ematch operations lookup table
|
||||
*
|
||||
* This function must be called by ematches to announce their presence.
|
||||
@@ -211,7 +211,7 @@ static int tcf_em_validate(struct tcf_proto *tp,
|
||||
if (ref <= idx)
|
||||
goto errout;
|
||||
|
||||
|
||||
|
||||
em->data = ref;
|
||||
} else {
|
||||
/* Note: This lookup will increase the module refcnt
|
||||
@@ -327,7 +327,7 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta,
|
||||
/* We do not use rtattr_parse_nested here because the maximum
|
||||
* number of attributes is unknown. This saves us the allocation
|
||||
* for a tb buffer which would serve no purpose at all.
|
||||
*
|
||||
*
|
||||
* The array of rt attributes is parsed in the order as they are
|
||||
* provided, their type must be incremental from 1 to n. Even
|
||||
* if it does not serve any real purpose, a failure of sticking
|
||||
@@ -399,7 +399,7 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree)
|
||||
module_put(em->ops->owner);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tree->hdr.nmatches = 0;
|
||||
kfree(tree->matches);
|
||||
}
|
||||
|
||||
+9
-9
@@ -389,7 +389,7 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
|
||||
struct Qdisc *q = *old;
|
||||
|
||||
|
||||
if (parent == NULL) {
|
||||
if (parent == NULL) {
|
||||
if (q && q->flags&TCQ_F_INGRESS) {
|
||||
*old = dev_graft_qdisc(dev, q);
|
||||
} else {
|
||||
@@ -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)
|
||||
@@ -808,10 +808,10 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
|
||||
#endif
|
||||
gnet_stats_copy_queue(&d, &q->qstats) < 0)
|
||||
goto rtattr_failure;
|
||||
|
||||
|
||||
if (gnet_stats_finish_copy(&d) < 0)
|
||||
goto rtattr_failure;
|
||||
|
||||
|
||||
nlh->nlmsg_len = skb->tail - b;
|
||||
return skb->len;
|
||||
|
||||
@@ -954,7 +954,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
|
||||
}
|
||||
|
||||
/* OK. Locate qdisc */
|
||||
if ((q = qdisc_lookup(dev, qid)) == NULL)
|
||||
if ((q = qdisc_lookup(dev, qid)) == NULL)
|
||||
return -ENOENT;
|
||||
|
||||
/* An check that it supports classes */
|
||||
@@ -978,7 +978,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
|
||||
goto out;
|
||||
} else {
|
||||
switch (n->nlmsg_type) {
|
||||
case RTM_NEWTCLASS:
|
||||
case RTM_NEWTCLASS:
|
||||
err = -EEXIST;
|
||||
if (n->nlmsg_flags&NLM_F_EXCL)
|
||||
goto out;
|
||||
@@ -1162,7 +1162,7 @@ reclassify:
|
||||
skb->tc_verd = SET_TC_VERD(skb->tc_verd,verd);
|
||||
goto reclassify;
|
||||
} else {
|
||||
if (skb->tc_verd)
|
||||
if (skb->tc_verd)
|
||||
skb->tc_verd = SET_TC_VERD(skb->tc_verd,0);
|
||||
return err;
|
||||
}
|
||||
@@ -1200,7 +1200,7 @@ static struct file_operations psched_fops = {
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_SCH_CLK_CPU
|
||||
|
||||
+11
-11
@@ -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++;
|
||||
@@ -726,7 +726,7 @@ static int __init atm_init(void)
|
||||
return register_qdisc(&atm_qdisc_ops);
|
||||
}
|
||||
|
||||
static void __exit atm_exit(void)
|
||||
static void __exit atm_exit(void)
|
||||
{
|
||||
unregister_qdisc(&atm_qdisc_ops);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user