]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rtnetlink: fix rtnl_vfinfo_size
authorSabrina Dubroca <sd@queasysnail.net>
Tue, 15 Nov 2016 09:39:03 +0000 (10:39 +0100)
committerBrian Maly <brian.maly@oracle.com>
Tue, 24 Jul 2018 20:03:21 +0000 (16:03 -0400)
commit7fc9c24f622c87dfadb82ccf34e9d4337eb5695c
tree5298fcfc08551d2d8ac1584e77c8683166e7477f
parentd7c3dd268540d2ffb7f61e2de892f4f42118073c
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 3b766cd83232), nor for struct
ifla_vf_tx_rate (since commit ed616689a3d9, 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: ed616689a3d9 ("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>
Orabug: 27998927

(cherry picked from commit 7e75f74a171a8146cc3ee92d5562878b40c25fb5)
Signed-off-by: Divya Indi <divya.indi@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
net/core/rtnetlink.c
(Precedes commits that added VF stats, VF trust, vlan info)

Signed-off-by: Brian Maly <brian.maly@oracle.com>
net/core/rtnetlink.c