Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20303
b: refs/heads/master
c: 479a079
h: refs/heads/master
i:
  20301: 620befb
  20299: 4224fa0
  20295: 542f308
  20287: db79bcd
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed Feb 8, 2006
1 parent 8af614f commit 7b8c05b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8cf3f04f45694db0699f608c0e3fb550c607cc88
refs/heads/master: 479a079663bd4c5f3d2714643b1b8c406aaba3e0
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ enum {
IPOIB_FLAG_SUBINTERFACE = 4,
IPOIB_MCAST_RUN = 5,
IPOIB_STOP_REAPER = 6,
IPOIB_MCAST_STARTED = 7,

IPOIB_MAX_BACKOFF_SECONDS = 16,

Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@ int ipoib_mcast_start_thread(struct net_device *dev)
queue_work(ipoib_workqueue, &priv->mcast_task);
mutex_unlock(&mcast_mutex);

spin_lock_irq(&priv->lock);
set_bit(IPOIB_MCAST_STARTED, &priv->flags);
spin_unlock_irq(&priv->lock);

return 0;
}

Expand All @@ -611,6 +615,10 @@ int ipoib_mcast_stop_thread(struct net_device *dev, int flush)

ipoib_dbg_mcast(priv, "stopping multicast thread\n");

spin_lock_irq(&priv->lock);
clear_bit(IPOIB_MCAST_STARTED, &priv->flags);
spin_unlock_irq(&priv->lock);

mutex_lock(&mcast_mutex);
clear_bit(IPOIB_MCAST_RUN, &priv->flags);
cancel_delayed_work(&priv->mcast_task);
Expand Down Expand Up @@ -693,6 +701,12 @@ void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
*/
spin_lock(&priv->lock);

if (!test_bit(IPOIB_MCAST_STARTED, &priv->flags)) {
++priv->stats.tx_dropped;
dev_kfree_skb_any(skb);
goto unlock;
}

mcast = __ipoib_mcast_find(dev, mgid);
if (!mcast) {
/* Let's create a new send only group now */
Expand Down Expand Up @@ -754,6 +768,7 @@ void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
ipoib_send(dev, skb, mcast->ah, IB_MULTICAST_QPN);
}

unlock:
spin_unlock(&priv->lock);
}

Expand Down

0 comments on commit 7b8c05b

Please sign in to comment.