diff options
author | David S. Miller <davem@davemloft.net> | 2012-02-06 15:14:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-09 13:50:34 -0500 |
commit | 16bda13d90c8d5da243e2cfa1677e62ecce26860 (patch) | |
tree | d10c9e0f9b043170c5bba4599ab1dc006d2a76eb /net/sched | |
parent | 9cc00b51a3cbb3b933065a55eaa9bfc306411b7a (diff) |
net: Make qdisc_skb_cb upper size bound explicit.
Just like skb->cb[], so that qdisc_skb_cb can be encapsulated inside
of other data structures.
This is intended to be used by IPoIB so that it can remember
addressing information stored at hard_header_ops->create() time that
it can fetch when the packet gets to the transmit routine.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_choke.c | 3 | ||||
-rw-r--r-- | net/sched/sch_netem.c | 3 | ||||
-rw-r--r-- | net/sched/sch_sfb.c | 3 | ||||
-rw-r--r-- | net/sched/sch_sfq.c | 5 |
4 files changed, 5 insertions, 9 deletions
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c index e465064d39a3..7e267d7b9c75 100644 --- a/net/sched/sch_choke.c +++ b/net/sched/sch_choke.c | |||
@@ -148,8 +148,7 @@ struct choke_skb_cb { | |||
148 | 148 | ||
149 | static inline struct choke_skb_cb *choke_skb_cb(const struct sk_buff *skb) | 149 | static inline struct choke_skb_cb *choke_skb_cb(const struct sk_buff *skb) |
150 | { | 150 | { |
151 | BUILD_BUG_ON(sizeof(skb->cb) < | 151 | qdisc_cb_private_validate(skb, sizeof(struct choke_skb_cb)); |
152 | sizeof(struct qdisc_skb_cb) + sizeof(struct choke_skb_cb)); | ||
153 | return (struct choke_skb_cb *)qdisc_skb_cb(skb)->data; | 152 | return (struct choke_skb_cb *)qdisc_skb_cb(skb)->data; |
154 | } | 153 | } |
155 | 154 | ||
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 2776012132ea..e83d61ca78ca 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -130,8 +130,7 @@ struct netem_skb_cb { | |||
130 | 130 | ||
131 | static inline struct netem_skb_cb *netem_skb_cb(struct sk_buff *skb) | 131 | static inline struct netem_skb_cb *netem_skb_cb(struct sk_buff *skb) |
132 | { | 132 | { |
133 | BUILD_BUG_ON(sizeof(skb->cb) < | 133 | qdisc_cb_private_validate(skb, sizeof(struct netem_skb_cb)); |
134 | sizeof(struct qdisc_skb_cb) + sizeof(struct netem_skb_cb)); | ||
135 | return (struct netem_skb_cb *)qdisc_skb_cb(skb)->data; | 134 | return (struct netem_skb_cb *)qdisc_skb_cb(skb)->data; |
136 | } | 135 | } |
137 | 136 | ||
diff --git a/net/sched/sch_sfb.c b/net/sched/sch_sfb.c index 96e42cae4c7a..d7eea99333e9 100644 --- a/net/sched/sch_sfb.c +++ b/net/sched/sch_sfb.c | |||
@@ -94,8 +94,7 @@ struct sfb_skb_cb { | |||
94 | 94 | ||
95 | static inline struct sfb_skb_cb *sfb_skb_cb(const struct sk_buff *skb) | 95 | static inline struct sfb_skb_cb *sfb_skb_cb(const struct sk_buff *skb) |
96 | { | 96 | { |
97 | BUILD_BUG_ON(sizeof(skb->cb) < | 97 | qdisc_cb_private_validate(skb, sizeof(struct sfb_skb_cb)); |
98 | sizeof(struct qdisc_skb_cb) + sizeof(struct sfb_skb_cb)); | ||
99 | return (struct sfb_skb_cb *)qdisc_skb_cb(skb)->data; | 98 | return (struct sfb_skb_cb *)qdisc_skb_cb(skb)->data; |
100 | } | 99 | } |
101 | 100 | ||
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 67494aef9acf..60d47180f043 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -166,9 +166,8 @@ struct sfq_skb_cb { | |||
166 | 166 | ||
167 | static inline struct sfq_skb_cb *sfq_skb_cb(const struct sk_buff *skb) | 167 | static inline struct sfq_skb_cb *sfq_skb_cb(const struct sk_buff *skb) |
168 | { | 168 | { |
169 | BUILD_BUG_ON(sizeof(skb->cb) < | 169 | qdisc_cb_private_validate(skb, sizeof(struct sfq_skb_cb)); |
170 | sizeof(struct qdisc_skb_cb) + sizeof(struct sfq_skb_cb)); | 170 | return (struct sfq_skb_cb *)qdisc_skb_cb(skb)->data; |
171 | return (struct sfq_skb_cb *)qdisc_skb_cb(skb)->data; | ||
172 | } | 171 | } |
173 | 172 | ||
174 | static unsigned int sfq_hash(const struct sfq_sched_data *q, | 173 | static unsigned int sfq_hash(const struct sfq_sched_data *q, |