Commit d0df6d6d4539241179a1ef5394787825bf05bbce

Authored by Roland Dreier
1 parent aec79fcc3e

IPoIB: Create MCGs with all attributes required by RFC

RFC 4391 ("Transmission of IP over InfiniBand (IPoIB)") says:

  If the IB multicast group does not already exist, one must be
  created first with the IPoIB link MTU.  The MGID MUST use the same
  P_Key, Q_Key, SL, MTU, and HopLimit as those used in the
  broadcast-GID.  The rest of attributes SHOULD follow the values used
  in the broadcast-GID as well.

However, the current IPoIB driver is only setting the attributes
required by the InfiniBand spec to create a multicast group, so in
particular the MTU and HopLimit are not being set.  Add these
attributes when creating MCGs, and also set the Rate attribute, since
IPoIB pays attention to that attribute as well.

Signed-off-by: Roland Dreier <rolandd@cisco.com>

Showing 1 changed file with 15 additions and 5 deletions Side-by-side Diff

drivers/infiniband/ulp/ipoib/ipoib_multicast.c
... ... @@ -472,15 +472,25 @@
472 472  
473 473 if (create) {
474 474 comp_mask |=
475   - IB_SA_MCMEMBER_REC_QKEY |
476   - IB_SA_MCMEMBER_REC_SL |
477   - IB_SA_MCMEMBER_REC_FLOW_LABEL |
478   - IB_SA_MCMEMBER_REC_TRAFFIC_CLASS;
  475 + IB_SA_MCMEMBER_REC_QKEY |
  476 + IB_SA_MCMEMBER_REC_MTU_SELECTOR |
  477 + IB_SA_MCMEMBER_REC_MTU |
  478 + IB_SA_MCMEMBER_REC_TRAFFIC_CLASS |
  479 + IB_SA_MCMEMBER_REC_RATE_SELECTOR |
  480 + IB_SA_MCMEMBER_REC_RATE |
  481 + IB_SA_MCMEMBER_REC_SL |
  482 + IB_SA_MCMEMBER_REC_FLOW_LABEL |
  483 + IB_SA_MCMEMBER_REC_HOP_LIMIT;
479 484  
480 485 rec.qkey = priv->broadcast->mcmember.qkey;
  486 + rec.mtu_selector = IB_SA_EQ;
  487 + rec.mtu = priv->broadcast->mcmember.mtu;
  488 + rec.traffic_class = priv->broadcast->mcmember.traffic_class;
  489 + rec.rate_selector = IB_SA_EQ;
  490 + rec.rate = priv->broadcast->mcmember.rate;
481 491 rec.sl = priv->broadcast->mcmember.sl;
482 492 rec.flow_label = priv->broadcast->mcmember.flow_label;
483   - rec.traffic_class = priv->broadcast->mcmember.traffic_class;
  493 + rec.hop_limit = priv->broadcast->mcmember.hop_limit;
484 494 }
485 495  
486 496 init_completion(&mcast->done);