aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 21:07:51 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:27:19 -0500
commit66c6f529c31e2886536aad4b2320d566deb1f150 (patch)
tree6237e856b5850112206efd72eeb1a7bbc8af2072
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>
-rw-r--r--include/net/sch_generic.h2
-rw-r--r--net/sched/cls_rsvp.h16
-rw-r--r--net/sched/sch_api.c2
-rw-r--r--net/sched/sch_dsmark.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index b0e9108a4e18..6b3829480b3a 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -144,7 +144,7 @@ struct tcf_proto
144 void *root; 144 void *root;
145 int (*classify)(struct sk_buff*, struct tcf_proto*, 145 int (*classify)(struct sk_buff*, struct tcf_proto*,
146 struct tcf_result *); 146 struct tcf_result *);
147 u32 protocol; 147 __be16 protocol;
148 148
149 /* All the rest */ 149 /* All the rest */
150 u32 prio; 150 u32 prio;
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h
index 6e230ecfba05..587b9adab38c 100644
--- a/net/sched/cls_rsvp.h
+++ b/net/sched/cls_rsvp.h
@@ -77,7 +77,7 @@ struct rsvp_head
77struct rsvp_session 77struct rsvp_session
78{ 78{
79 struct rsvp_session *next; 79 struct rsvp_session *next;
80 u32 dst[RSVP_DST_LEN]; 80 __be32 dst[RSVP_DST_LEN];
81 struct tc_rsvp_gpi dpi; 81 struct tc_rsvp_gpi dpi;
82 u8 protocol; 82 u8 protocol;
83 u8 tunnelid; 83 u8 tunnelid;
@@ -89,7 +89,7 @@ struct rsvp_session
89struct rsvp_filter 89struct rsvp_filter
90{ 90{
91 struct rsvp_filter *next; 91 struct rsvp_filter *next;
92 u32 src[RSVP_DST_LEN]; 92 __be32 src[RSVP_DST_LEN];
93 struct tc_rsvp_gpi spi; 93 struct tc_rsvp_gpi spi;
94 u8 tunnelhdr; 94 u8 tunnelhdr;
95 95
@@ -100,17 +100,17 @@ struct rsvp_filter
100 struct rsvp_session *sess; 100 struct rsvp_session *sess;
101}; 101};
102 102
103static __inline__ unsigned hash_dst(u32 *dst, u8 protocol, u8 tunnelid) 103static __inline__ unsigned hash_dst(__be32 *dst, u8 protocol, u8 tunnelid)
104{ 104{
105 unsigned h = dst[RSVP_DST_LEN-1]; 105 unsigned h = (__force __u32)dst[RSVP_DST_LEN-1];
106 h ^= h>>16; 106 h ^= h>>16;
107 h ^= h>>8; 107 h ^= h>>8;
108 return (h ^ protocol ^ tunnelid) & 0xFF; 108 return (h ^ protocol ^ tunnelid) & 0xFF;
109} 109}
110 110
111static __inline__ unsigned hash_src(u32 *src) 111static __inline__ unsigned hash_src(__be32 *src)
112{ 112{
113 unsigned h = src[RSVP_DST_LEN-1]; 113 unsigned h = (__force __u32)src[RSVP_DST_LEN-1];
114 h ^= h>>16; 114 h ^= h>>16;
115 h ^= h>>8; 115 h ^= h>>8;
116 h ^= h>>4; 116 h ^= h>>4;
@@ -138,7 +138,7 @@ static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
138 struct rsvp_session *s; 138 struct rsvp_session *s;
139 struct rsvp_filter *f; 139 struct rsvp_filter *f;
140 unsigned h1, h2; 140 unsigned h1, h2;
141 u32 *dst, *src; 141 __be32 *dst, *src;
142 u8 protocol; 142 u8 protocol;
143 u8 tunnelid = 0; 143 u8 tunnelid = 0;
144 u8 *xprt; 144 u8 *xprt;
@@ -410,7 +410,7 @@ static int rsvp_change(struct tcf_proto *tp, unsigned long base,
410 struct rtattr *tb[TCA_RSVP_MAX]; 410 struct rtattr *tb[TCA_RSVP_MAX];
411 struct tcf_exts e; 411 struct tcf_exts e;
412 unsigned h1, h2; 412 unsigned h1, h2;
413 u32 *dst; 413 __be32 *dst;
414 int err; 414 int err;
415 415
416 if (opt == NULL) 416 if (opt == NULL)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 0b6489291140..d99802f3023d 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,
1112 struct tcf_result *res) 1112 struct tcf_result *res)
1113{ 1113{
1114 int err = 0; 1114 int err = 0;
1115 u32 protocol = skb->protocol; 1115 __be16 protocol = skb->protocol;
1116#ifdef CONFIG_NET_CLS_ACT 1116#ifdef CONFIG_NET_CLS_ACT
1117 struct tcf_proto *otp = tp; 1117 struct tcf_proto *otp = tp;
1118reclassify: 1118reclassify:
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 11c8a2119b96..0b7c0e82d600 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)
307 if (p->mask[index] != 0xff || p->value[index]) 307 if (p->mask[index] != 0xff || p->value[index])
308 printk(KERN_WARNING "dsmark_dequeue: " 308 printk(KERN_WARNING "dsmark_dequeue: "
309 "unsupported protocol %d\n", 309 "unsupported protocol %d\n",
310 htons(skb->protocol)); 310 ntohs(skb->protocol));
311 break; 311 break;
312 }; 312 };
313 313