diff options
author | Greg Rose <gregory.v.rose@intel.com> | 2011-06-09 21:27:09 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-06-09 23:38:07 -0400 |
commit | c7ac8679bec9397afe8918f788cbcef88c38da54 (patch) | |
tree | c152712de4c997ea79252ef9ac72aaedb8f88c18 /net/phonet | |
parent | 929dd047720785f099e12113780b3d7914ce6d9f (diff) |
rtnetlink: Compute and store minimum ifinfo dump size
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>
Diffstat (limited to 'net/phonet')
-rw-r--r-- | net/phonet/pn_netlink.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c index 438accb7a5a8..d61f6761777d 100644 --- a/net/phonet/pn_netlink.c +++ b/net/phonet/pn_netlink.c | |||
@@ -289,15 +289,16 @@ out: | |||
289 | 289 | ||
290 | int __init phonet_netlink_register(void) | 290 | int __init phonet_netlink_register(void) |
291 | { | 291 | { |
292 | int err = __rtnl_register(PF_PHONET, RTM_NEWADDR, addr_doit, NULL); | 292 | int err = __rtnl_register(PF_PHONET, RTM_NEWADDR, addr_doit, |
293 | NULL, NULL); | ||
293 | if (err) | 294 | if (err) |
294 | return err; | 295 | return err; |
295 | 296 | ||
296 | /* Further __rtnl_register() cannot fail */ | 297 | /* Further __rtnl_register() cannot fail */ |
297 | __rtnl_register(PF_PHONET, RTM_DELADDR, addr_doit, NULL); | 298 | __rtnl_register(PF_PHONET, RTM_DELADDR, addr_doit, NULL, NULL); |
298 | __rtnl_register(PF_PHONET, RTM_GETADDR, NULL, getaddr_dumpit); | 299 | __rtnl_register(PF_PHONET, RTM_GETADDR, NULL, getaddr_dumpit, NULL); |
299 | __rtnl_register(PF_PHONET, RTM_NEWROUTE, route_doit, NULL); | 300 | __rtnl_register(PF_PHONET, RTM_NEWROUTE, route_doit, NULL, NULL); |
300 | __rtnl_register(PF_PHONET, RTM_DELROUTE, route_doit, NULL); | 301 | __rtnl_register(PF_PHONET, RTM_DELROUTE, route_doit, NULL, NULL); |
301 | __rtnl_register(PF_PHONET, RTM_GETROUTE, NULL, route_dumpit); | 302 | __rtnl_register(PF_PHONET, RTM_GETROUTE, NULL, route_dumpit, NULL); |
302 | return 0; | 303 | return 0; |
303 | } | 304 | } |