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_rsvp.h
diff --git
a/net/sched/cls_rsvp.h
b/net/sched/cls_rsvp.h
index
572f06b
..
587b9ad
100644
(file)
--- a/
net/sched/cls_rsvp.h
+++ b/
net/sched/cls_rsvp.h
@@
-65,7
+65,6
@@
Well, as result, despite its simplicity, we get a pretty
powerful classification engine. */
Well, as result, despite its simplicity, we get a pretty
powerful classification engine. */
-#include <linux/config.h>
struct rsvp_head
{
struct rsvp_head
{
@@
-78,7
+77,7
@@
struct rsvp_head
struct rsvp_session
{
struct rsvp_session *next;
struct rsvp_session
{
struct rsvp_session *next;
-
u32
dst[RSVP_DST_LEN];
+
__be32
dst[RSVP_DST_LEN];
struct tc_rsvp_gpi dpi;
u8 protocol;
u8 tunnelid;
struct tc_rsvp_gpi dpi;
u8 protocol;
u8 tunnelid;
@@
-90,7
+89,7
@@
struct rsvp_session
struct rsvp_filter
{
struct rsvp_filter *next;
struct rsvp_filter
{
struct rsvp_filter *next;
-
u32
src[RSVP_DST_LEN];
+
__be32
src[RSVP_DST_LEN];
struct tc_rsvp_gpi spi;
u8 tunnelhdr;
struct tc_rsvp_gpi spi;
u8 tunnelhdr;
@@
-101,17
+100,17
@@
struct rsvp_filter
struct rsvp_session *sess;
};
struct rsvp_session *sess;
};
-static __inline__ unsigned hash_dst(
u
32 *dst, u8 protocol, u8 tunnelid)
+static __inline__ unsigned hash_dst(
__be
32 *dst, u8 protocol, u8 tunnelid)
{
{
- unsigned h = dst[RSVP_DST_LEN-1];
+ unsigned h =
(__force __u32)
dst[RSVP_DST_LEN-1];
h ^= h>>16;
h ^= h>>8;
return (h ^ protocol ^ tunnelid) & 0xFF;
}
h ^= h>>16;
h ^= h>>8;
return (h ^ protocol ^ tunnelid) & 0xFF;
}
-static __inline__ unsigned hash_src(
u
32 *src)
+static __inline__ unsigned hash_src(
__be
32 *src)
{
{
- unsigned h = src[RSVP_DST_LEN-1];
+ unsigned h =
(__force __u32)
src[RSVP_DST_LEN-1];
h ^= h>>16;
h ^= h>>8;
h ^= h>>4;
h ^= h>>16;
h ^= h>>8;
h ^= h>>4;
@@
-139,7
+138,7
@@
static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct rsvp_session *s;
struct rsvp_filter *f;
unsigned h1, h2;
struct rsvp_session *s;
struct rsvp_filter *f;
unsigned h1, h2;
-
u
32 *dst, *src;
+
__be
32 *dst, *src;
u8 protocol;
u8 tunnelid = 0;
u8 *xprt;
u8 protocol;
u8 tunnelid = 0;
u8 *xprt;
@@
-241,9
+240,8
@@
static int rsvp_init(struct tcf_proto *tp)
{
struct rsvp_head *data;
{
struct rsvp_head *data;
- data = k
m
alloc(sizeof(struct rsvp_head), GFP_KERNEL);
+ data = k
z
alloc(sizeof(struct rsvp_head), GFP_KERNEL);
if (data) {
if (data) {
- memset(data, 0, sizeof(struct rsvp_head));
tp->root = data;
return 0;
}
tp->root = data;
return 0;
}
@@
-412,7
+410,7
@@
static int rsvp_change(struct tcf_proto *tp, unsigned long base,
struct rtattr *tb[TCA_RSVP_MAX];
struct tcf_exts e;
unsigned h1, h2;
struct rtattr *tb[TCA_RSVP_MAX];
struct tcf_exts e;
unsigned h1, h2;
-
u
32 *dst;
+
__be
32 *dst;
int err;
if (opt == NULL)
int err;
if (opt == NULL)
@@
-447,11
+445,10
@@
static int rsvp_change(struct tcf_proto *tp, unsigned long base,
goto errout2;
err = -ENOBUFS;
goto errout2;
err = -ENOBUFS;
- f = k
m
alloc(sizeof(struct rsvp_filter), GFP_KERNEL);
+ f = k
z
alloc(sizeof(struct rsvp_filter), GFP_KERNEL);
if (f == NULL)
goto errout2;
if (f == NULL)
goto errout2;
- memset(f, 0, sizeof(*f));
h2 = 16;
if (tb[TCA_RSVP_SRC-1]) {
err = -EINVAL;
h2 = 16;
if (tb[TCA_RSVP_SRC-1]) {
err = -EINVAL;
@@
-533,10
+530,9
@@
insert:
/* No session found. Create new one. */
err = -ENOBUFS;
/* No session found. Create new one. */
err = -ENOBUFS;
- s = k
m
alloc(sizeof(struct rsvp_session), GFP_KERNEL);
+ s = k
z
alloc(sizeof(struct rsvp_session), GFP_KERNEL);
if (s == NULL)
goto errout;
if (s == NULL)
goto errout;
- memset(s, 0, sizeof(*s));
memcpy(s->dst, dst, sizeof(s->dst));
if (pinfo) {
memcpy(s->dst, dst, sizeof(s->dst));
if (pinfo) {