|
@@ -153,7 +153,7 @@ static struct ipoib_mcast *ipoib_mcast_alloc(struct net_device *dev,
|
|
return mcast;
|
|
return mcast;
|
|
}
|
|
}
|
|
|
|
|
|
-struct ipoib_mcast *__ipoib_mcast_find(struct net_device *dev, void *mgid)
|
|
|
|
|
|
+static struct ipoib_mcast *__ipoib_mcast_find(struct net_device *dev, void *mgid)
|
|
{
|
|
{
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
struct rb_node *n = priv->multicast_tree.rb_node;
|
|
struct rb_node *n = priv->multicast_tree.rb_node;
|
|
@@ -704,6 +704,25 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Check if the multicast group is sendonly. If so remove it from the maps
|
|
|
|
+ * and add to the remove list
|
|
|
|
+ */
|
|
|
|
+void ipoib_check_and_add_mcast_sendonly(struct ipoib_dev_priv *priv, u8 *mgid,
|
|
|
|
+ struct list_head *remove_list)
|
|
|
|
+{
|
|
|
|
+ /* Is this multicast ? */
|
|
|
|
+ if (*mgid == 0xff) {
|
|
|
|
+ struct ipoib_mcast *mcast = __ipoib_mcast_find(priv->dev, mgid);
|
|
|
|
+
|
|
|
|
+ if (mcast && test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
|
|
|
|
+ list_del(&mcast->list);
|
|
|
|
+ rb_erase(&mcast->rb_node, &priv->multicast_tree);
|
|
|
|
+ list_add_tail(&mcast->list, remove_list);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
void ipoib_mcast_remove_list(struct net_device *dev, struct list_head *remove_list)
|
|
void ipoib_mcast_remove_list(struct net_device *dev, struct list_head *remove_list)
|
|
{
|
|
{
|
|
struct ipoib_mcast *mcast, *tmcast;
|
|
struct ipoib_mcast *mcast, *tmcast;
|