RE: [PATCH] net_sched: use explicit size of struct tcmsg, remove need to declare tcm

From: David Laight
Date: Mon Sep 18 2017 - 11:10:49 EST


From: Eric Dumazet
> Sent: 18 September 2017 16:01
...
> > > - err = nlmsg_parse(nlh, sizeof(*tcm), tca, TCA_MAX, NULL, NULL);
> > > + err = nlmsg_parse(nlh, sizeof(struct tcmsg), tca, TCA_MAX, NULL, NULL);
> >
> > Would sizeof(*nlmsg_data(nlh)) be cleaner??
>
> Not really, since
>
> static inline void *nlmsg_data(const struct nlmsghdr *nlh)

I thought about that after posting :-(

David