[openib-general] [PATCH 2/2] ipoib: handle multicast group reset notification

Sean Hefty sean.hefty at intel.com
Thu Jun 8 21:54:59 PDT 2006


Ipoib already checks for events that require rejoining multicast groups.
We just need to add code to handle (i.e. ignore) multicast group reset
notifications.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
Ignoring the callback is a simple fix.  I didn't try to see what it would
take to have ipoib use the ib_multicast event to trigger a re-join.  My
guess is that it would be less efficient, since ipoib would get a callback
for every group on the affected port.

Index: ipoib_multicast.c
===================================================================
--- ipoib_multicast.c	(revision 7758)
+++ ipoib_multicast.c	(working copy)
@@ -306,6 +306,10 @@ ipoib_mcast_sendonly_join_complete(int s
 	struct net_device *dev = mcast->dev;
 	struct ipoib_dev_priv *priv = netdev_priv(dev);
 
+	/* We trap for port events ourselves. */
+	if (status == -ENETRESET)
+		return 0;
+
 	if (!status)
 		status = ipoib_mcast_join_finish(mcast, &multicast->rec);
 	
@@ -390,6 +394,10 @@ static int ipoib_mcast_join_complete(int
 			" (status %d)\n",
 			IPOIB_GID_ARG(mcast->mcmember.mgid), status);
 
+	/* We trap for port events ourselves. */
+	if (status == -ENETRESET)
+		return 0;
+
 	if (!status)
 		status = ipoib_mcast_join_finish(mcast, &multicast->rec);
 





More information about the general mailing list