Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101046
b: refs/heads/master
c: c8c2afe
h: refs/heads/master
v: v3
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Jul 15, 2008
1 parent 271a429 commit c3523b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9eae554c171e086c89ab83da2a2d3c8bf958fcb5
refs/heads/master: c8c2afe360b7366f586f6bece1109a72ea334876
8 changes: 6 additions & 2 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,9 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
ipoib_warn(priv, "enabling connected mode "
"will cause multicast packet drops\n");

rtnl_lock();
dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO);
rtnl_unlock();
priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM;

ipoib_flush_paths(dev);
Expand All @@ -1449,14 +1451,16 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,

if (!strcmp(buf, "datagram\n")) {
clear_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags);
dev->mtu = min(priv->mcast_mtu, dev->mtu);
ipoib_flush_paths(dev);

rtnl_lock();
if (test_bit(IPOIB_FLAG_CSUM, &priv->flags)) {
dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
if (priv->hca_caps & IB_DEVICE_UD_TSO)
dev->features |= NETIF_F_TSO;
}
dev->mtu = min(priv->mcast_mtu, dev->mtu);
rtnl_unlock();
ipoib_flush_paths(dev);

return count;
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,11 @@ void ipoib_mcast_join_task(struct work_struct *work)

priv->mcast_mtu = IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu));

if (!ipoib_cm_admin_enabled(dev))
if (!ipoib_cm_admin_enabled(dev)) {
rtnl_lock();
dev->mtu = min(priv->mcast_mtu, priv->admin_mtu);
rtnl_unlock();
}

ipoib_dbg_mcast(priv, "successfully joined all multicast groups\n");

Expand Down

0 comments on commit c3523b0

Please sign in to comment.