Lines Matching full:av

159 	struct mthca_av *av = NULL;  in mthca_create_ah()  local
164 ah->av = kmalloc(sizeof *ah->av, GFP_ATOMIC); in mthca_create_ah()
165 if (!ah->av) in mthca_create_ah()
169 av = ah->av; in mthca_create_ah()
178 av = kmalloc(sizeof *av, GFP_ATOMIC); in mthca_create_ah()
179 if (!av) in mthca_create_ah()
189 ah->av = dma_pool_zalloc(dev->av_table.pool, in mthca_create_ah()
191 if (!ah->av) in mthca_create_ah()
194 av = ah->av; in mthca_create_ah()
199 av->port_pd = cpu_to_be32(pd->pd_num | in mthca_create_ah()
201 av->g_slid = rdma_ah_get_path_bits(ah_attr); in mthca_create_ah()
202 av->dlid = cpu_to_be16(rdma_ah_get_dlid(ah_attr)); in mthca_create_ah()
203 av->msg_sr = (3 << 4) | /* 2K message */ in mthca_create_ah()
206 av->sl_tclass_flowlabel = cpu_to_be32(rdma_ah_get_sl(ah_attr) << 28); in mthca_create_ah()
210 av->g_slid |= 0x80; in mthca_create_ah()
211 av->gid_index = (rdma_ah_get_port_num(ah_attr) - 1) * in mthca_create_ah()
214 av->hop_limit = grh->hop_limit; in mthca_create_ah()
215 av->sl_tclass_flowlabel |= in mthca_create_ah()
218 memcpy(av->dgid, grh->dgid.raw, 16); in mthca_create_ah()
221 av->dgid[3] = cpu_to_be32(2); in mthca_create_ah()
228 av, (unsigned long) ah->avdma); in mthca_create_ah()
231 j * 4, be32_to_cpu(((__be32 *) av)[j])); in mthca_create_ah()
236 av, MTHCA_AV_SIZE); in mthca_create_ah()
237 kfree(av); in mthca_create_ah()
253 dma_pool_free(dev->av_table.pool, ah->av, ah->avdma); in mthca_destroy_ah()
257 kfree(ah->av); in mthca_destroy_ah()
266 return !!(ah->av->g_slid & 0x80); in mthca_ah_grh_present()
275 header->lrh.service_level = be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28; in mthca_read_ah()
276 header->lrh.destination_lid = ah->av->dlid; in mthca_read_ah()
277 header->lrh.source_lid = cpu_to_be16(ah->av->g_slid & 0x7f); in mthca_read_ah()
280 (be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 20) & 0xff; in mthca_read_ah()
282 ah->av->sl_tclass_flowlabel & cpu_to_be32(0xfffff); in mthca_read_ah()
283 header->grh.hop_limit = ah->av->hop_limit; in mthca_read_ah()
286 ah->av->dgid, 16); in mthca_read_ah()
296 u32 port_num = be32_to_cpu(ah->av->port_pd) >> 24; in mthca_ah_query()
304 rdma_ah_set_dlid(attr, be16_to_cpu(ah->av->dlid)); in mthca_ah_query()
305 rdma_ah_set_sl(attr, be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28); in mthca_ah_query()
308 mthca_rate_to_ib(dev, ah->av->msg_sr & 0x7, in mthca_ah_query()
310 rdma_ah_set_path_bits(attr, ah->av->g_slid & 0x7F); in mthca_ah_query()
312 u32 tc_fl = be32_to_cpu(ah->av->sl_tclass_flowlabel); in mthca_ah_query()
316 ah->av->gid_index & in mthca_ah_query()
318 ah->av->hop_limit, in mthca_ah_query()
320 rdma_ah_set_dgid_raw(attr, ah->av->dgid); in mthca_ah_query()