rtnetlink: Compute and store minimum ifinfo dump size
commit2e3cbdeae8e4d13087657d95ed7a5be57dc9695e
authorGreg Rose <gregory.v.rose@intel.com>
Fri, 4 Jan 2013 00:32:54 +0000 (4 00:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:43:58 +0000 (17 08:43 -0800)
treec72f2246ae87fffe750e24b4ac827cab2cde9d3b
parent4a6cf0c4f4f8465d61adbf3aaaec2bd100e30d97
rtnetlink: Compute and store minimum ifinfo dump size

commit c7ac8679bec9397afe8918f788cbcef88c38da54 upstream.

The message size allocated for rtnl ifinfo dumps was limited to
a single page.  This is not enough for additional interface info
available with devices that support SR-IOV and caused a bug in
which VF info would not be displayed if more than approximately
40 VFs were created per interface.

Implement a new function pointer for the rtnl_register service that will
calculate the amount of data required for the ifinfo dump and allocate
enough data to satisfy the request.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30 files changed:
drivers/infiniband/core/netlink.c
include/linux/netlink.h
include/net/rtnetlink.h
net/bridge/br_netlink.c
net/core/fib_rules.c
net/core/neighbour.c
net/core/rtnetlink.c
net/dcb/dcbnl.c
net/decnet/dn_dev.c
net/decnet/dn_fib.c
net/decnet/dn_route.c
net/ipv4/devinet.c
net/ipv4/fib_frontend.c
net/ipv4/inet_diag.c
net/ipv4/ipmr.c
net/ipv4/route.c
net/ipv6/addrconf.c
net/ipv6/addrlabel.c
net/ipv6/ip6_fib.c
net/ipv6/ip6mr.c
net/ipv6/route.c
net/netfilter/ipset/ip_set_core.c
net/netfilter/nf_conntrack_netlink.c
net/netlink/af_netlink.c
net/netlink/genetlink.c
net/phonet/pn_netlink.c
net/sched/act_api.c
net/sched/cls_api.c
net/sched/sch_api.c
net/xfrm/xfrm_user.c