aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2011-06-09 21:27:09 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-06-09 23:38:07 -0400
commitc7ac8679bec9397afe8918f788cbcef88c38da54 (patch)
treec152712de4c997ea79252ef9ac72aaedb8f88c18 /net/ipv6/addrconf.c
parent929dd047720785f099e12113780b3d7914ce6d9f (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/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 3e369425df58..05838c7fcf64 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4727,16 +4727,20 @@ int __init addrconf_init(void)
4727 if (err < 0) 4727 if (err < 0)
4728 goto errout_af; 4728 goto errout_af;
4729 4729
4730 err = __rtnl_register(PF_INET6, RTM_GETLINK, NULL, inet6_dump_ifinfo); 4730 err = __rtnl_register(PF_INET6, RTM_GETLINK, NULL, inet6_dump_ifinfo,
4731 NULL);
4731 if (err < 0) 4732 if (err < 0)
4732 goto errout; 4733 goto errout;
4733 4734
4734 /* Only the first call to __rtnl_register can fail */ 4735 /* Only the first call to __rtnl_register can fail */
4735 __rtnl_register(PF_INET6, RTM_NEWADDR, inet6_rtm_newaddr, NULL); 4736 __rtnl_register(PF_INET6, RTM_NEWADDR, inet6_rtm_newaddr, NULL, NULL);
4736 __rtnl_register(PF_INET6, RTM_DELADDR, inet6_rtm_deladdr, NULL); 4737 __rtnl_register(PF_INET6, RTM_DELADDR, inet6_rtm_deladdr, NULL, NULL);
4737 __rtnl_register(PF_INET6, RTM_GETADDR, inet6_rtm_getaddr, inet6_dump_ifaddr); 4738 __rtnl_register(PF_INET6, RTM_GETADDR, inet6_rtm_getaddr,
4738 __rtnl_register(PF_INET6, RTM_GETMULTICAST, NULL, inet6_dump_ifmcaddr); 4739 inet6_dump_ifaddr, NULL);
4739 __rtnl_register(PF_INET6, RTM_GETANYCAST, NULL, inet6_dump_ifacaddr); 4740 __rtnl_register(PF_INET6, RTM_GETMULTICAST, NULL,
4741 inet6_dump_ifmcaddr, NULL);
4742 __rtnl_register(PF_INET6, RTM_GETANYCAST, NULL,
4743 inet6_dump_ifacaddr, NULL);
4740 4744
4741 ipv6_addr_label_rtnl_register(); 4745 ipv6_addr_label_rtnl_register();
4742 4746