aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_multicast.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index a8395ef06c17..07b9826b5193 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -250,6 +250,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
250 .port_num = priv->port, 250 .port_num = priv->port,
251 .sl = mcast->mcmember.sl, 251 .sl = mcast->mcmember.sl,
252 .ah_flags = IB_AH_GRH, 252 .ah_flags = IB_AH_GRH,
253 .static_rate = mcast->mcmember.rate,
253 .grh = { 254 .grh = {
254 .flow_label = be32_to_cpu(mcast->mcmember.flow_label), 255 .flow_label = be32_to_cpu(mcast->mcmember.flow_label),
255 .hop_limit = mcast->mcmember.hop_limit, 256 .hop_limit = mcast->mcmember.hop_limit,
@@ -257,17 +258,8 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
257 .traffic_class = mcast->mcmember.traffic_class 258 .traffic_class = mcast->mcmember.traffic_class
258 } 259 }
259 }; 260 };
260 int path_rate = ib_sa_rate_enum_to_int(mcast->mcmember.rate);
261
262 av.grh.dgid = mcast->mcmember.mgid; 261 av.grh.dgid = mcast->mcmember.mgid;
263 262
264 if (path_rate > 0 && priv->local_rate > path_rate)
265 av.static_rate = (priv->local_rate - 1) / path_rate;
266
267 ipoib_dbg_mcast(priv, "static_rate %d for local port %dX, mcmember %dX\n",
268 av.static_rate, priv->local_rate,
269 ib_sa_rate_enum_to_int(mcast->mcmember.rate));
270
271 ah = ipoib_create_ah(dev, priv->pd, &av); 263 ah = ipoib_create_ah(dev, priv->pd, &av);
272 if (!ah) { 264 if (!ah) {
273 ipoib_warn(priv, "ib_address_create failed\n"); 265 ipoib_warn(priv, "ib_address_create failed\n");