summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 18:07:51 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:27:19 -0800
commit66c6f529c31e2886536aad4b2320d566deb1f150 (patch)
tree6237e856b5850112206efd72eeb1a7bbc8af2072 /net/sched
parentff1dcadb1b55dbf471c5ed109dbbdf06bd19ef3b (diff)
[NET]: net/sched annotations.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_rsvp.h16
-rw-r--r--net/sched/sch_api.c2
-rw-r--r--net/sched/sch_dsmark.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h
index 6e230ecfba0..587b9adab38 100644
--- a/net/sched/cls_rsvp.h
+++ b/net/sched/cls_rsvp.h
@@ -77,7 +77,7 @@ struct rsvp_head
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;
@@ -89,7 +89,7 @@ struct rsvp_session
struct rsvp_filter
{
struct rsvp_filter *next;
- u32 src[RSVP_DST_LEN];
+ __be32 src[RSVP_DST_LEN];
struct tc_rsvp_gpi spi;
u8 tunnelhdr;
@@ -100,17 +100,17 @@ struct rsvp_filter
struct rsvp_session *sess;
};
-static __inline__ unsigned hash_dst(u32 *dst, u8 protocol, u8 tunnelid)
+static __inline__ unsigned hash_dst(__be32 *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;
}
-static __inline__ unsigned hash_src(u32 *src)
+static __inline__ unsigned hash_src(__be32 *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;
@@ -138,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;
- u32 *dst, *src;
+ __be32 *dst, *src;
u8 protocol;
u8 tunnelid = 0;
u8 *xprt;
@@ -410,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;
- u32 *dst;
+ __be32 *dst;
int err;
if (opt == NULL)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 0b648929114..d99802f3023 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1112,7 +1112,7 @@ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct tcf_result *res)
{
int err = 0;
- u32 protocol = skb->protocol;
+ __be16 protocol = skb->protocol;
#ifdef CONFIG_NET_CLS_ACT
struct tcf_proto *otp = tp;
reclassify:
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 11c8a2119b9..0b7c0e82d60 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -307,7 +307,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
if (p->mask[index] != 0xff || p->value[index])
printk(KERN_WARNING "dsmark_dequeue: "
"unsupported protocol %d\n",
- htons(skb->protocol));
+ ntohs(skb->protocol));
break;
};