Lines Matching refs:ah_attr

36 				  const struct rdma_ah_attr *ah_attr)  in mlx5_ah_get_udp_sport()  argument
38 enum ib_gid_type gid_type = ah_attr->grh.sgid_attr->gid_type; in mlx5_ah_get_udp_sport()
42 (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) && in mlx5_ah_get_udp_sport()
43 (ah_attr->grh.flow_label & IB_GRH_FLOWLABEL_MASK)) in mlx5_ah_get_udp_sport()
45 rdma_flow_label_to_udp_sport(ah_attr->grh.flow_label)); in mlx5_ah_get_udp_sport()
48 ah_attr->grh.sgid_attr); in mlx5_ah_get_udp_sport()
56 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in create_ib_ah() local
59 if (rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH) { in create_ib_ah()
60 const struct ib_global_route *grh = rdma_ah_read_grh(ah_attr); in create_ib_ah()
70 ah->av.stat_rate_sl = (rdma_ah_get_static_rate(ah_attr) << 4); in create_ib_ah()
72 if (ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) { in create_ib_ah()
77 gid_type = ah_attr->grh.sgid_attr->gid_type; in create_ib_ah()
79 memcpy(ah->av.rmac, ah_attr->roce.dmac, in create_ib_ah()
80 sizeof(ah_attr->roce.dmac)); in create_ib_ah()
81 ah->av.udp_sport = mlx5_ah_get_udp_sport(dev, ah_attr); in create_ib_ah()
82 ah->av.stat_rate_sl |= (rdma_ah_get_sl(ah_attr) & 0x7) << 1; in create_ib_ah()
87 ah->av.rlid = cpu_to_be16(rdma_ah_get_dlid(ah_attr)); in create_ib_ah()
88 ah->av.fl_mlid = rdma_ah_get_path_bits(ah_attr) & 0x7f; in create_ib_ah()
89 ah->av.stat_rate_sl |= (rdma_ah_get_sl(ah_attr) & 0xf); in create_ib_ah()
97 struct rdma_ah_attr *ah_attr = init_attr->ah_attr; in mlx5_ib_create_ah() local
100 enum rdma_ah_attr_type ah_type = ah_attr->type; in mlx5_ib_create_ah()
103 !(rdma_ah_get_ah_flags(ah_attr) & IB_AH_GRH)) in mlx5_ib_create_ah()
117 memcpy(resp.dmac, ah_attr->roce.dmac, ETH_ALEN); in mlx5_ib_create_ah()
127 int mlx5_ib_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr) in mlx5_ib_query_ah() argument
132 memset(ah_attr, 0, sizeof(*ah_attr)); in mlx5_ib_query_ah()
133 ah_attr->type = ibah->type; in mlx5_ib_query_ah()
137 rdma_ah_set_grh(ah_attr, NULL, in mlx5_ib_query_ah()
142 rdma_ah_set_dgid_raw(ah_attr, ah->av.rgid); in mlx5_ib_query_ah()
144 rdma_ah_set_dlid(ah_attr, be16_to_cpu(ah->av.rlid)); in mlx5_ib_query_ah()
145 rdma_ah_set_static_rate(ah_attr, ah->av.stat_rate_sl >> 4); in mlx5_ib_query_ah()
146 rdma_ah_set_sl(ah_attr, ah->av.stat_rate_sl & 0xf); in mlx5_ib_query_ah()