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 kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
include
/
net
/
pkt_act.h
diff --git
a/include/net/pkt_act.h
b/include/net/pkt_act.h
index
e7e7da3
..
b225d84
100644
(file)
--- a/
include/net/pkt_act.h
+++ b/
include/net/pkt_act.h
@@
-3,7
+3,7
@@
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/system.h>
-#include <
asm
/bitops.h>
+#include <
linux
/bitops.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-15,7
+15,6
@@
#include <linux/in.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/in.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
-#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/module.h>
@@
-60,7
+59,7
@@
tcf_hash_destroy(struct tcf_st *p)
*p1p = p->next;
write_unlock_bh(&tcf_t_lock);
#ifdef CONFIG_NET_ESTIMATOR
*p1p = p->next;
write_unlock_bh(&tcf_t_lock);
#ifdef CONFIG_NET_ESTIMATOR
-
qdisc_kill_estimator(&p->stats
);
+
gen_kill_estimator(&p->bstats, &p->rate_est
);
#endif
kfree(p);
return;
#endif
kfree(p);
return;
@@
-218,25
+217,22
@@
tcf_hash_search(struct tc_action *a, u32 index)
#ifdef CONFIG_NET_ACT_INIT
static inline struct tcf_st *
#ifdef CONFIG_NET_ACT_INIT
static inline struct tcf_st *
-tcf_hash_check(
struct tc_st *parm
, struct tc_action *a, int ovr, int bind)
+tcf_hash_check(
u32 index
, struct tc_action *a, int ovr, int bind)
{
struct tcf_st *p = NULL;
{
struct tcf_st *p = NULL;
- if (parm->index && (p = tcf_hash_lookup(parm->index)) != NULL) {
- spin_lock(&p->lock);
+ if (index && (p = tcf_hash_lookup(index)) != NULL) {
if (bind) {
p->bindcnt++;
p->refcnt++;
}
if (bind) {
p->bindcnt++;
p->refcnt++;
}
- spin_unlock(&p->lock);
- a->priv = (void *) p;
+ a->priv = p;
}
return p;
}
static inline struct tcf_st *
}
return p;
}
static inline struct tcf_st *
-tcf_hash_create(
struct tc_st *parm
, struct rtattr *est, struct tc_action *a, int size, int ovr, int bind)
+tcf_hash_create(
u32 index
, struct rtattr *est, struct tc_action *a, int size, int ovr, int bind)
{
{
- unsigned h;
struct tcf_st *p = NULL;
p = kmalloc(size, GFP_KERNEL);
struct tcf_st *p = NULL;
p = kmalloc(size, GFP_KERNEL);
@@
-252,32
+248,25
@@
tcf_hash_create(struct tc_st *parm, struct rtattr *est, struct tc_action *a, int
spin_lock_init(&p->lock);
p->stats_lock = &p->lock;
spin_lock_init(&p->lock);
p->stats_lock = &p->lock;
- p->index =
parm->
index ? : tcf_hash_new_index();
+ p->index = index ? : tcf_hash_new_index();
p->tm.install = jiffies;
p->tm.lastuse = jiffies;
#ifdef CONFIG_NET_ESTIMATOR
p->tm.install = jiffies;
p->tm.lastuse = jiffies;
#ifdef CONFIG_NET_ESTIMATOR
- if (est) {
- qdisc_new_estimator(&p->stats, p->stats_lock, est);
- }
+ if (est)
+ gen_new_estimator(&p->bstats, &p->rate_est, p->stats_lock, est);
#endif
#endif
- h = tcf_hash(p->index);
- write_lock_bh(&tcf_t_lock);
- p->next = tcf_ht[h];
- tcf_ht[h] = p;
- write_unlock_bh(&tcf_t_lock);
-
a->priv = (void *) p;
return p;
}
a->priv = (void *) p;
return p;
}
-static inline struct tcf_st *
-tcf_hash_init(struct tc_st *parm, struct rtattr *est, struct tc_action *a, int size, int ovr, int bind)
+static inline void tcf_hash_insert(struct tcf_st *p)
{
{
-
struct tcf_st *p = tcf_hash_check (parm,a,ovr,bind
);
+
unsigned h = tcf_hash(p->index
);
- if (!p)
- p = tcf_hash_create(parm, est, a, size, ovr, bind);
- return p;
+ write_lock_bh(&tcf_t_lock);
+ p->next = tcf_ht[h];
+ tcf_ht[h] = p;
+ write_unlock_bh(&tcf_t_lock);
}
#endif
}
#endif