git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
sched
/
cls_u32.c
diff --git
a/net/sched/cls_u32.c
b/net/sched/cls_u32.c
index
2b67047
..
8b51948
100644
(file)
--- a/
net/sched/cls_u32.c
+++ b/
net/sched/cls_u32.c
@@
-33,7
+33,6
@@
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/bitops.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/bitops.h>
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-144,7
+143,7
@@
next_knode:
#endif
#ifdef CONFIG_CLS_U32_MARK
#endif
#ifdef CONFIG_CLS_U32_MARK
- if ((skb->
nf
mark & n->mark.mask) != n->mark.val) {
+ if ((skb->mark & n->mark.mask) != n->mark.val) {
n = n->next;
goto next_knode;
} else {
n = n->next;
goto next_knode;
} else {
@@
-308,23
+307,21
@@
static int u32_init(struct tcf_proto *tp)
if (tp_c->q == tp->q)
break;
if (tp_c->q == tp->q)
break;
- root_ht = k
m
alloc(sizeof(*root_ht), GFP_KERNEL);
+ root_ht = k
z
alloc(sizeof(*root_ht), GFP_KERNEL);
if (root_ht == NULL)
return -ENOBUFS;
if (root_ht == NULL)
return -ENOBUFS;
- memset(root_ht, 0, sizeof(*root_ht));
root_ht->divisor = 0;
root_ht->refcnt++;
root_ht->handle = tp_c ? gen_new_htid(tp_c) : 0x80000000;
root_ht->prio = tp->prio;
if (tp_c == NULL) {
root_ht->divisor = 0;
root_ht->refcnt++;
root_ht->handle = tp_c ? gen_new_htid(tp_c) : 0x80000000;
root_ht->prio = tp->prio;
if (tp_c == NULL) {
- tp_c = k
m
alloc(sizeof(*tp_c), GFP_KERNEL);
+ tp_c = k
z
alloc(sizeof(*tp_c), GFP_KERNEL);
if (tp_c == NULL) {
kfree(root_ht);
return -ENOBUFS;
}
if (tp_c == NULL) {
kfree(root_ht);
return -ENOBUFS;
}
- memset(tp_c, 0, sizeof(*tp_c));
tp_c->q = tp->q;
tp_c->next = u32_list;
u32_list = tp_c;
tp_c->q = tp->q;
tp_c->next = u32_list;
u32_list = tp_c;
@@
-347,8
+344,7
@@
static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n)
if (n->ht_down)
n->ht_down->refcnt--;
#ifdef CONFIG_CLS_U32_PERF
if (n->ht_down)
n->ht_down->refcnt--;
#ifdef CONFIG_CLS_U32_PERF
- if (n)
- kfree(n->pf);
+ kfree(n->pf);
#endif
kfree(n);
return 0;
#endif
kfree(n);
return 0;
@@
-573,10
+569,9
@@
static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
if (handle == 0)
return -ENOMEM;
}
if (handle == 0)
return -ENOMEM;
}
- ht = k
m
alloc(sizeof(*ht) + divisor*sizeof(void*), GFP_KERNEL);
+ ht = k
z
alloc(sizeof(*ht) + divisor*sizeof(void*), GFP_KERNEL);
if (ht == NULL)
return -ENOBUFS;
if (ht == NULL)
return -ENOBUFS;
- memset(ht, 0, sizeof(*ht) + divisor*sizeof(void*));
ht->tp_c = tp_c;
ht->refcnt = 0;
ht->divisor = divisor;
ht->tp_c = tp_c;
ht->refcnt = 0;
ht->divisor = divisor;
@@
-619,18
+614,16
@@
static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
s = RTA_DATA(tb[TCA_U32_SEL-1]);
s = RTA_DATA(tb[TCA_U32_SEL-1]);
- n = k
m
alloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL);
+ n = k
z
alloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL);
if (n == NULL)
return -ENOBUFS;
if (n == NULL)
return -ENOBUFS;
- memset(n, 0, sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key));
#ifdef CONFIG_CLS_U32_PERF
#ifdef CONFIG_CLS_U32_PERF
- n->pf = k
m
alloc(sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64), GFP_KERNEL);
+ n->pf = k
z
alloc(sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64), GFP_KERNEL);
if (n->pf == NULL) {
kfree(n);
return -ENOBUFS;
}
if (n->pf == NULL) {
kfree(n);
return -ENOBUFS;
}
- memset(n->pf, 0, sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64));
#endif
memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key));
#endif
memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key));
@@
-680,8
+673,7
@@
static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
return 0;
}
#ifdef CONFIG_CLS_U32_PERF
return 0;
}
#ifdef CONFIG_CLS_U32_PERF
- if (n)
- kfree(n->pf);
+ kfree(n->pf);
#endif
kfree(n);
return err;
#endif
kfree(n);
return err;
@@
-804,7
+796,7
@@
static int __init init_u32(void)
{
printk("u32 classifier\n");
#ifdef CONFIG_CLS_U32_PERF
{
printk("u32 classifier\n");
#ifdef CONFIG_CLS_U32_PERF
- printk(" Perfomance counters on\n");
+ printk(" Perfo
r
mance counters on\n");
#endif
#ifdef CONFIG_NET_CLS_POLICE
printk(" OLD policer on \n");
#endif
#ifdef CONFIG_NET_CLS_POLICE
printk(" OLD policer on \n");