Lines Matching refs:ib_ah_attr
397 static void to_ib_ah_attr(struct mthca_dev *dev, struct ib_ah_attr *ib_ah_attr, in to_ib_ah_attr() argument
400 memset(ib_ah_attr, 0, sizeof *ib_ah_attr); in to_ib_ah_attr()
401 ib_ah_attr->port_num = (be32_to_cpu(path->port_pkey) >> 24) & 0x3; in to_ib_ah_attr()
403 if (ib_ah_attr->port_num == 0 || ib_ah_attr->port_num > dev->limits.num_ports) in to_ib_ah_attr()
406 ib_ah_attr->dlid = be16_to_cpu(path->rlid); in to_ib_ah_attr()
407 ib_ah_attr->sl = be32_to_cpu(path->sl_tclass_flowlabel) >> 28; in to_ib_ah_attr()
408 ib_ah_attr->src_path_bits = path->g_mylmc & 0x7f; in to_ib_ah_attr()
409 ib_ah_attr->static_rate = mthca_rate_to_ib(dev, in to_ib_ah_attr()
411 ib_ah_attr->port_num); in to_ib_ah_attr()
412 ib_ah_attr->ah_flags = (path->g_mylmc & (1 << 7)) ? IB_AH_GRH : 0; in to_ib_ah_attr()
413 if (ib_ah_attr->ah_flags) { in to_ib_ah_attr()
414 ib_ah_attr->grh.sgid_index = path->mgid_index & (dev->limits.gid_table_len - 1); in to_ib_ah_attr()
415 ib_ah_attr->grh.hop_limit = path->hop_limit; in to_ib_ah_attr()
416 ib_ah_attr->grh.traffic_class = in to_ib_ah_attr()
418 ib_ah_attr->grh.flow_label = in to_ib_ah_attr()
420 memcpy(ib_ah_attr->grh.dgid.raw, in to_ib_ah_attr()
421 path->rgid, sizeof ib_ah_attr->grh.dgid.raw); in to_ib_ah_attr()
516 static int mthca_path_set(struct mthca_dev *dev, const struct ib_ah_attr *ah, in mthca_path_set()