On Wed, Jul 29, 2020 at 3:41 AM <[email protected]> wrote:
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index c510b03..45401d5 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -384,6 +384,7 @@ struct qdisc_skb_cb {
> };
> #define QDISC_CB_PRIV_LEN 20
> unsigned char data[QDISC_CB_PRIV_LEN];
> + u16 mru;
> };
Hmm, can you put it in the anonymous struct before 'data'?
We validate this cb size and data size like blow:
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) < offsetof(struct qdisc_skb_cb,
data) + sz);
BUILD_BUG_ON(sizeof(qcb->data) < sz);
}
It _kinda_ expects ->data at the end.
The rest of your patch looks good to me, so feel free to add:
Reviewed-by: Cong Wang <[email protected]>
Thanks.