aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMoni Shoua <monis@voltaire.com>2009-09-15 05:37:40 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-15 05:37:40 -0400
commit75c78500ddad74b229cd0691496b8549490496a2 (patch)
tree5249219d68627421e4717c4e8f03f8b4bbad2e92 /include
parent481a8199142c050b72bff8a1956a49fd0a75bbe0 (diff)
bonding: remap muticast addresses without using dev_close() and dev_open()
This patch fixes commit e36b9d16c6a6d0f59803b3ef04ff3c22c3844c10. The approach there is to call dev_close()/dev_open() whenever the device type is changed in order to remap the device IP multicast addresses to HW multicast addresses. This approach suffers from 2 drawbacks: *. It assumes tha the device is UP when calling dev_close(), or otherwise dev_close() has no affect. It is worth to mention that initscripts (Redhat) and sysconfig (Suse) doesn't act the same in this matter. *. dev_close() has other side affects, like deleting entries from the routing table, which might be unnecessary. The fix here is to directly remap the IP multicast addresses to HW multicast addresses for a bonding device that changes its type, and nothing else. Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Moni Shoua <monis@voltaire.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/igmp.h2
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/linux/notifier.h2
-rw-r--r--include/net/addrconf.h2
4 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index 92fbd8cbd68f..fe158e0e20e6 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -233,6 +233,8 @@ extern void ip_mc_init_dev(struct in_device *);
233extern void ip_mc_destroy_dev(struct in_device *); 233extern void ip_mc_destroy_dev(struct in_device *);
234extern void ip_mc_up(struct in_device *); 234extern void ip_mc_up(struct in_device *);
235extern void ip_mc_down(struct in_device *); 235extern void ip_mc_down(struct in_device *);
236extern void ip_mc_unmap(struct in_device *);
237extern void ip_mc_remap(struct in_device *);
236extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); 238extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr);
237extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); 239extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr);
238extern void ip_mc_rejoin_group(struct ip_mc_list *im); 240extern void ip_mc_rejoin_group(struct ip_mc_list *im);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 65ee1929b2b1..f46db6c7a734 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1873,7 +1873,8 @@ extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct
1873extern int dev_set_promiscuity(struct net_device *dev, int inc); 1873extern int dev_set_promiscuity(struct net_device *dev, int inc);
1874extern int dev_set_allmulti(struct net_device *dev, int inc); 1874extern int dev_set_allmulti(struct net_device *dev, int inc);
1875extern void netdev_state_change(struct net_device *dev); 1875extern void netdev_state_change(struct net_device *dev);
1876extern void netdev_bonding_change(struct net_device *dev); 1876extern void netdev_bonding_change(struct net_device *dev,
1877 unsigned long event);
1877extern void netdev_features_change(struct net_device *dev); 1878extern void netdev_features_change(struct net_device *dev);
1878/* Load a device via the kmod */ 1879/* Load a device via the kmod */
1879extern void dev_load(struct net *net, const char *name); 1880extern void dev_load(struct net *net, const char *name);
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 81bc252dc8ac..44428d247dbe 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -199,6 +199,8 @@ static inline int notifier_to_errno(int ret)
199#define NETDEV_FEAT_CHANGE 0x000B 199#define NETDEV_FEAT_CHANGE 0x000B
200#define NETDEV_BONDING_FAILOVER 0x000C 200#define NETDEV_BONDING_FAILOVER 0x000C
201#define NETDEV_PRE_UP 0x000D 201#define NETDEV_PRE_UP 0x000D
202#define NETDEV_BONDING_OLDTYPE 0x000E
203#define NETDEV_BONDING_NEWTYPE 0x000F
202 204
203#define SYS_DOWN 0x0001 /* Notify of system down */ 205#define SYS_DOWN 0x0001 /* Notify of system down */
204#define SYS_RESTART SYS_DOWN 206#define SYS_RESTART SYS_DOWN
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 7b55ab215a64..0f7c37825fc1 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -143,6 +143,8 @@ extern int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr
143extern int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr); 143extern int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr);
144extern void ipv6_mc_up(struct inet6_dev *idev); 144extern void ipv6_mc_up(struct inet6_dev *idev);
145extern void ipv6_mc_down(struct inet6_dev *idev); 145extern void ipv6_mc_down(struct inet6_dev *idev);
146extern void ipv6_mc_unmap(struct inet6_dev *idev);
147extern void ipv6_mc_remap(struct inet6_dev *idev);
146extern void ipv6_mc_init_dev(struct inet6_dev *idev); 148extern void ipv6_mc_init_dev(struct inet6_dev *idev);
147extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); 149extern void ipv6_mc_destroy_dev(struct inet6_dev *idev);
148extern void addrconf_dad_failure(struct inet6_ifaddr *ifp); 150extern void addrconf_dad_failure(struct inet6_ifaddr *ifp);