提交 66c6f529 编写于 作者: A Al Viro 提交者: David S. Miller

[NET]: net/sched annotations.

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ff1dcadb
...@@ -144,7 +144,7 @@ struct tcf_proto ...@@ -144,7 +144,7 @@ struct tcf_proto
void *root; void *root;
int (*classify)(struct sk_buff*, struct tcf_proto*, int (*classify)(struct sk_buff*, struct tcf_proto*,
struct tcf_result *); struct tcf_result *);
u32 protocol; __be16 protocol;
/* All the rest */ /* All the rest */
u32 prio; u32 prio;
......
...@@ -77,7 +77,7 @@ struct rsvp_head ...@@ -77,7 +77,7 @@ struct rsvp_head
struct rsvp_session struct rsvp_session
{ {
struct rsvp_session *next; struct rsvp_session *next;
u32 dst[RSVP_DST_LEN]; __be32 dst[RSVP_DST_LEN];
struct tc_rsvp_gpi dpi; struct tc_rsvp_gpi dpi;
u8 protocol; u8 protocol;
u8 tunnelid; u8 tunnelid;
...@@ -89,7 +89,7 @@ struct rsvp_session ...@@ -89,7 +89,7 @@ struct rsvp_session
struct rsvp_filter struct rsvp_filter
{ {
struct rsvp_filter *next; struct rsvp_filter *next;
u32 src[RSVP_DST_LEN]; __be32 src[RSVP_DST_LEN];
struct tc_rsvp_gpi spi; struct tc_rsvp_gpi spi;
u8 tunnelhdr; u8 tunnelhdr;
...@@ -100,17 +100,17 @@ struct rsvp_filter ...@@ -100,17 +100,17 @@ struct rsvp_filter
struct rsvp_session *sess; 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>>16;
h ^= h>>8; h ^= h>>8;
return (h ^ protocol ^ tunnelid) & 0xFF; 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>>16;
h ^= h>>8; h ^= h>>8;
h ^= h>>4; h ^= h>>4;
...@@ -138,7 +138,7 @@ static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, ...@@ -138,7 +138,7 @@ static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct rsvp_session *s; struct rsvp_session *s;
struct rsvp_filter *f; struct rsvp_filter *f;
unsigned h1, h2; unsigned h1, h2;
u32 *dst, *src; __be32 *dst, *src;
u8 protocol; u8 protocol;
u8 tunnelid = 0; u8 tunnelid = 0;
u8 *xprt; u8 *xprt;
...@@ -410,7 +410,7 @@ static int rsvp_change(struct tcf_proto *tp, unsigned long base, ...@@ -410,7 +410,7 @@ static int rsvp_change(struct tcf_proto *tp, unsigned long base,
struct rtattr *tb[TCA_RSVP_MAX]; struct rtattr *tb[TCA_RSVP_MAX];
struct tcf_exts e; struct tcf_exts e;
unsigned h1, h2; unsigned h1, h2;
u32 *dst; __be32 *dst;
int err; int err;
if (opt == NULL) if (opt == NULL)
......
...@@ -1112,7 +1112,7 @@ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, ...@@ -1112,7 +1112,7 @@ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct tcf_result *res) struct tcf_result *res)
{ {
int err = 0; int err = 0;
u32 protocol = skb->protocol; __be16 protocol = skb->protocol;
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
struct tcf_proto *otp = tp; struct tcf_proto *otp = tp;
reclassify: reclassify:
......
...@@ -307,7 +307,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch) ...@@ -307,7 +307,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
if (p->mask[index] != 0xff || p->value[index]) if (p->mask[index] != 0xff || p->value[index])
printk(KERN_WARNING "dsmark_dequeue: " printk(KERN_WARNING "dsmark_dequeue: "
"unsupported protocol %d\n", "unsupported protocol %d\n",
htons(skb->protocol)); ntohs(skb->protocol));
break; break;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册