Lines Matching refs:ah_attr

32 				  struct ib_ah_attr *ah_attr,
35 if (ah_attr->ah_flags & IB_AH_GRH) {
36 memcpy(ah->av.rgid, &ah_attr->grh.dgid, 16);
37 ah->av.grh_gid_fl = cpu_to_be32(ah_attr->grh.flow_label |
39 ah_attr->grh.sgid_index << 20);
40 ah->av.hop_limit = ah_attr->grh.hop_limit;
41 ah->av.tclass = ah_attr->grh.traffic_class;
44 ah->av.stat_rate_sl = (ah_attr->static_rate << 4);
47 memcpy(ah->av.rmac, ah_attr->dmac, sizeof(ah_attr->dmac));
50 ah_attr->port_num,
51 ah_attr->grh.sgid_index);
52 ah->av.stat_rate_sl |= (ah_attr->sl & 0x7) << 1;
54 ah->av.rlid = cpu_to_be16(ah_attr->dlid);
55 ah->av.fl_mlid = ah_attr->src_path_bits & 0x7f;
56 ah->av.stat_rate_sl |= (ah_attr->sl & 0xf);
62 struct ib_ah *mlx5_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr,
70 ll = pd->device->get_link_layer(pd->device, ah_attr->port_num);
72 if (ll == IB_LINK_LAYER_ETHERNET && !(ah_attr->ah_flags & IB_AH_GRH))
86 err = ib_resolve_eth_dmac(pd->device, ah_attr);
90 memcpy(resp.dmac, ah_attr->dmac, ETH_ALEN);
100 return create_ib_ah(dev, ah, ah_attr, ll); /* never fails */
103 int mlx5_ib_query_ah(struct ib_ah *ibah, struct ib_ah_attr *ah_attr)
108 memset(ah_attr, 0, sizeof(*ah_attr));
112 ah_attr->ah_flags = IB_AH_GRH;
113 ah_attr->grh.sgid_index = (tmp >> 20) & 0xff;
114 ah_attr->grh.flow_label = tmp & 0xfffff;
115 memcpy(&ah_attr->grh.dgid, ah->av.rgid, 16);
116 ah_attr->grh.hop_limit = ah->av.hop_limit;
117 ah_attr->grh.traffic_class = ah->av.tclass;
119 ah_attr->dlid = be16_to_cpu(ah->av.rlid);
120 ah_attr->static_rate = ah->av.stat_rate_sl >> 4;
121 ah_attr->sl = ah->av.stat_rate_sl & 0xf;