mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
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>
This commit is contained in:
parent
9cc00b51a3
commit
16bda13d90
5 changed files with 13 additions and 10 deletions
|
|
@ -220,9 +220,16 @@ struct tcf_proto {
|
|||
|
||||
struct qdisc_skb_cb {
|
||||
unsigned int pkt_len;
|
||||
long data[];
|
||||
unsigned char data[24];
|
||||
};
|
||||
|
||||
static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
|
||||
{
|
||||
struct qdisc_skb_cb *qcb;
|
||||
BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz);
|
||||
BUILD_BUG_ON(sizeof(qcb->data) < sz);
|
||||
}
|
||||
|
||||
static inline int qdisc_qlen(const struct Qdisc *q)
|
||||
{
|
||||
return q->q.qlen;
|
||||
|
|
|
|||
Loading…
Reference in a new issue