Lines Matching refs:ib_ah_attr
1298 static int _mlx4_set_path(struct mlx4_ib_dev *dev, const struct ib_ah_attr *ah, in _mlx4_set_path()
3193 static void to_ib_ah_attr(struct mlx4_ib_dev *ibdev, struct ib_ah_attr *ib_ah_attr, in to_ib_ah_attr() argument
3199 memset(ib_ah_attr, 0, sizeof *ib_ah_attr); in to_ib_ah_attr()
3200 ib_ah_attr->port_num = path->sched_queue & 0x40 ? 2 : 1; in to_ib_ah_attr()
3202 if (ib_ah_attr->port_num == 0 || ib_ah_attr->port_num > dev->caps.num_ports) in to_ib_ah_attr()
3205 is_eth = rdma_port_get_link_layer(&ibdev->ib_dev, ib_ah_attr->port_num) == in to_ib_ah_attr()
3208 ib_ah_attr->sl = ((path->sched_queue >> 3) & 0x7) | in to_ib_ah_attr()
3211 ib_ah_attr->sl = (path->sched_queue >> 2) & 0xf; in to_ib_ah_attr()
3213 ib_ah_attr->dlid = be16_to_cpu(path->rlid); in to_ib_ah_attr()
3214 ib_ah_attr->src_path_bits = path->grh_mylmc & 0x7f; in to_ib_ah_attr()
3215 ib_ah_attr->static_rate = path->static_rate ? path->static_rate - 5 : 0; in to_ib_ah_attr()
3216 ib_ah_attr->ah_flags = (path->grh_mylmc & (1 << 7)) ? IB_AH_GRH : 0; in to_ib_ah_attr()
3217 if (ib_ah_attr->ah_flags) { in to_ib_ah_attr()
3218 ib_ah_attr->grh.sgid_index = path->mgid_index; in to_ib_ah_attr()
3219 ib_ah_attr->grh.hop_limit = path->hop_limit; in to_ib_ah_attr()
3220 ib_ah_attr->grh.traffic_class = in to_ib_ah_attr()
3222 ib_ah_attr->grh.flow_label = in to_ib_ah_attr()
3224 memcpy(ib_ah_attr->grh.dgid.raw, in to_ib_ah_attr()
3225 path->rgid, sizeof ib_ah_attr->grh.dgid.raw); in to_ib_ah_attr()