diff options
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index f6bb08b73ca4..55ce96b53b09 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -220,9 +220,16 @@ struct tcf_proto { | |||
220 | 220 | ||
221 | struct qdisc_skb_cb { | 221 | struct qdisc_skb_cb { |
222 | unsigned int pkt_len; | 222 | unsigned int pkt_len; |
223 | long data[]; | 223 | unsigned char data[24]; |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) | ||
227 | { | ||
228 | struct qdisc_skb_cb *qcb; | ||
229 | BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz); | ||
230 | BUILD_BUG_ON(sizeof(qcb->data) < sz); | ||
231 | } | ||
232 | |||
226 | static inline int qdisc_qlen(const struct Qdisc *q) | 233 | static inline int qdisc_qlen(const struct Qdisc *q) |
227 | { | 234 | { |
228 | return q->q.qlen; | 235 | return q->q.qlen; |