Changeset View
Changeset View
Standalone View
Standalone View
sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | if (!memcmp(mcast->mcmember.mgid.raw, dev->if_broadcastaddr + 4, | ||||
sizeof (union ib_gid))) { | sizeof (union ib_gid))) { | ||||
spin_lock_irq(&priv->lock); | spin_lock_irq(&priv->lock); | ||||
if (!priv->broadcast) { | if (!priv->broadcast) { | ||||
spin_unlock_irq(&priv->lock); | spin_unlock_irq(&priv->lock); | ||||
return -EAGAIN; | return -EAGAIN; | ||||
} | } | ||||
priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey); | priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey); | ||||
spin_unlock_irq(&priv->lock); | spin_unlock_irq(&priv->lock); | ||||
priv->tx_wr.wr.ud.remote_qkey = priv->qkey; | priv->tx_wr.remote_qkey = priv->qkey; | ||||
set_qkey = 1; | set_qkey = 1; | ||||
} | } | ||||
if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { | if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { | ||||
if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { | if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { | ||||
ipoib_warn(priv, "multicast group %16D already attached\n", | ipoib_warn(priv, "multicast group %16D already attached\n", | ||||
mcast->mcmember.mgid.raw, ":"); | mcast->mcmember.mgid.raw, ":"); | ||||
▲ Show 20 Lines • Show All 296 Lines • ▼ Show 20 Lines | void ipoib_mcast_join_task(struct work_struct *work) | ||||
if (ib_query_port(priv->ca, priv->port, &attr) || | if (ib_query_port(priv->ca, priv->port, &attr) || | ||||
attr.state != IB_PORT_ACTIVE) { | attr.state != IB_PORT_ACTIVE) { | ||||
ipoib_dbg(priv, "%s: port state is not ACTIVE (state = %d) suspend task.\n", | ipoib_dbg(priv, "%s: port state is not ACTIVE (state = %d) suspend task.\n", | ||||
__func__, attr.state); | __func__, attr.state); | ||||
return; | return; | ||||
} | } | ||||
if (ib_query_gid(priv->ca, priv->port, 0, &priv->local_gid)) | if (ib_query_gid(priv->ca, priv->port, 0, &priv->local_gid, NULL)) | ||||
ipoib_warn(priv, "ib_query_gid() failed\n"); | ipoib_warn(priv, "ib_query_gid() failed\n"); | ||||
else | else | ||||
memcpy(IF_LLADDR(dev) + 4, priv->local_gid.raw, sizeof (union ib_gid)); | memcpy(IF_LLADDR(dev) + 4, priv->local_gid.raw, sizeof (union ib_gid)); | ||||
{ | { | ||||
struct ib_port_attr attr; | struct ib_port_attr attr; | ||||
if (!ib_query_port(priv->ca, priv->port, &attr)) | if (!ib_query_port(priv->ca, priv->port, &attr)) | ||||
▲ Show 20 Lines • Show All 424 Lines • Show Last 20 Lines |