Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f37cae6 authored by Rolf Manderscheid's avatar Rolf Manderscheid Committed by Roland Dreier
Browse files

IB/mthca: Set GRH:HopLimit when building MLX headers



Global CM packets used by rmda_cm were being sent with a GRH:hopLimit
of zero, causing them to be dropped by the router.  The problem is a
missing initialization of the hop_limit field in mthca_read_ah(),
which was called by build_mlx_header() when sending a MAD on QP1.

Signed-off-by: default avatarRolf Manderscheid <rvm@obsidianresearch.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 1f8f7b7a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -279,6 +279,7 @@ int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah,
			(be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 20) & 0xff;
			(be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 20) & 0xff;
		header->grh.flow_label    =
		header->grh.flow_label    =
			ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff);
			ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff);
		header->grh.hop_limit     = ah->av->hop_limit;
		ib_get_cached_gid(&dev->ib_dev,
		ib_get_cached_gid(&dev->ib_dev,
				  be32_to_cpu(ah->av->port_pd) >> 24,
				  be32_to_cpu(ah->av->port_pd) >> 24,
				  ah->av->gid_index % dev->limits.gid_table_len,
				  ah->av->gid_index % dev->limits.gid_table_len,