]> git.baikalelectronics.ru Git - kernel.git/commit
rtnetlink: fix rtnl_vfinfo_size
authorSabrina Dubroca <sd@queasysnail.net>
Tue, 15 Nov 2016 09:39:03 +0000 (10:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 03:40:07 +0000 (22:40 -0500)
commit35df2f79c012d28c3e950b15be567ea3d8f72b68
tree0922958766d190b0512e4a56103bc16711541b5e
parent35ec025598c54c32fafb1c19339f7edf14e88f78
rtnetlink: fix rtnl_vfinfo_size

The size reported by rtnl_vfinfo_size doesn't match the space used by
rtnl_fill_vfinfo.

rtnl_vfinfo_size currently doesn't account for the nest attributes
used by statistics (added in commit 044c9acbd2f7), nor for struct
ifla_vf_tx_rate (since commit d67764dca77b, which added ifla_vf_rate
to the dump without removing ifla_vf_tx_rate, but replaced
ifla_vf_tx_rate with ifla_vf_rate in the size computation).

Fixes: 044c9acbd2f7 ("net/core: Add reading VF statistics through the PF netdevice")
Fixes: d67764dca77b ("net-next:v4: Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c