• Home
  • Raw
  • Download

Lines Matching refs:sqp

640 	struct mlx4_ib_sqp *sqp;  in create_qp_common()  local
691 sqp = kzalloc(sizeof (struct mlx4_ib_sqp), gfp); in create_qp_common()
692 if (!sqp) in create_qp_common()
694 qp = &sqp->qp; in create_qp_common()
1287 static void store_sqp_attrs(struct mlx4_ib_sqp *sqp, const struct ib_qp_attr *attr, in store_sqp_attrs() argument
1291 sqp->pkey_index = attr->pkey_index; in store_sqp_attrs()
1293 sqp->qkey = attr->qkey; in store_sqp_attrs()
1295 sqp->send_psn = attr->sq_psn; in store_sqp_attrs()
2147 static int build_sriov_qp0_header(struct mlx4_ib_sqp *sqp, in build_sriov_qp0_header() argument
2151 struct mlx4_ib_dev *mdev = to_mdev(sqp->qp.ibqp.device); in build_sriov_qp0_header()
2174 if (sqp->qp.mlx4_ib_qp_type == MLX4_IB_QPT_PROXY_SMI_OWNER) in build_sriov_qp0_header()
2177 ib_ud_header_init(send_size, 1, 0, 0, 0, 0, &sqp->ud_header); in build_sriov_qp0_header()
2179 if (sqp->qp.mlx4_ib_qp_type == MLX4_IB_QPT_PROXY_SMI_OWNER) { in build_sriov_qp0_header()
2180 sqp->ud_header.lrh.service_level = in build_sriov_qp0_header()
2182 sqp->ud_header.lrh.destination_lid = in build_sriov_qp0_header()
2184 sqp->ud_header.lrh.source_lid = in build_sriov_qp0_header()
2192 mlx->rlid = sqp->ud_header.lrh.destination_lid; in build_sriov_qp0_header()
2194 sqp->ud_header.lrh.virtual_lane = 0; in build_sriov_qp0_header()
2195 sqp->ud_header.bth.solicited_event = !!(wr->wr.send_flags & IB_SEND_SOLICITED); in build_sriov_qp0_header()
2196 err = ib_get_cached_pkey(ib_dev, sqp->qp.port, 0, &pkey); in build_sriov_qp0_header()
2199 sqp->ud_header.bth.pkey = cpu_to_be16(pkey); in build_sriov_qp0_header()
2200 if (sqp->qp.mlx4_ib_qp_type == MLX4_IB_QPT_TUN_SMI_OWNER) in build_sriov_qp0_header()
2201 sqp->ud_header.bth.destination_qpn = cpu_to_be32(wr->remote_qpn); in build_sriov_qp0_header()
2203 sqp->ud_header.bth.destination_qpn = in build_sriov_qp0_header()
2204 cpu_to_be32(mdev->dev->caps.qp0_tunnel[sqp->qp.port - 1]); in build_sriov_qp0_header()
2206 sqp->ud_header.bth.psn = cpu_to_be32((sqp->send_psn++) & ((1 << 24) - 1)); in build_sriov_qp0_header()
2208 if (mlx4_get_parav_qkey(mdev->dev, sqp->qp.mqp.qpn, &qkey)) in build_sriov_qp0_header()
2211 if (vf_get_qp0_qkey(mdev->dev, sqp->qp.mqp.qpn, &qkey)) in build_sriov_qp0_header()
2214 sqp->ud_header.deth.qkey = cpu_to_be32(qkey); in build_sriov_qp0_header()
2215 sqp->ud_header.deth.source_qpn = cpu_to_be32(sqp->qp.mqp.qpn); in build_sriov_qp0_header()
2217 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY; in build_sriov_qp0_header()
2218 sqp->ud_header.immediate_present = 0; in build_sriov_qp0_header()
2220 header_size = ib_ud_header_pack(&sqp->ud_header, sqp->header_buf); in build_sriov_qp0_header()
2232 memcpy(inl + 1, sqp->header_buf, header_size); in build_sriov_qp0_header()
2236 memcpy(inl + 1, sqp->header_buf, spc); in build_sriov_qp0_header()
2239 memcpy(inl + 1, sqp->header_buf + spc, header_size - spc); in build_sriov_qp0_header()
2273 static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_ud_wr *wr, in build_mlx_header() argument
2276 struct ib_device *ib_dev = sqp->qp.ibqp.device; in build_mlx_header()
2297 is_eth = rdma_port_get_link_layer(sqp->qp.ibqp.device, sqp->qp.port) == IB_LINK_LAYER_ETHERNET; in build_mlx_header()
2325 ib_ud_header_init(send_size, !is_eth, is_eth, is_vlan, is_grh, 0, &sqp->ud_header); in build_mlx_header()
2328 sqp->ud_header.lrh.service_level = in build_mlx_header()
2330 sqp->ud_header.lrh.destination_lid = ah->av.ib.dlid; in build_mlx_header()
2331 sqp->ud_header.lrh.source_lid = cpu_to_be16(ah->av.ib.g_slid & 0x7f); in build_mlx_header()
2335 sqp->ud_header.grh.traffic_class = in build_mlx_header()
2337 sqp->ud_header.grh.flow_label = in build_mlx_header()
2339 sqp->ud_header.grh.hop_limit = ah->av.ib.hop_limit; in build_mlx_header()
2341 memcpy(sqp->ud_header.grh.source_gid.raw, sgid.raw, 16); in build_mlx_header()
2348 sqp->ud_header.grh.source_gid.global.subnet_prefix = in build_mlx_header()
2350 demux[sqp->qp.port - 1]. in build_mlx_header()
2352 sqp->ud_header.grh.source_gid.global.interface_id = in build_mlx_header()
2353 to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1]. in build_mlx_header()
2359 &sqp->ud_header.grh.source_gid, NULL); in build_mlx_header()
2362 memcpy(sqp->ud_header.grh.destination_gid.raw, in build_mlx_header()
2369 mlx->flags |= cpu_to_be32((!sqp->qp.ibqp.qp_num ? MLX4_WQE_MLX_VL15 : 0) | in build_mlx_header()
2370 (sqp->ud_header.lrh.destination_lid == in build_mlx_header()
2372 (sqp->ud_header.lrh.service_level << 8)); in build_mlx_header()
2375 mlx->rlid = sqp->ud_header.lrh.destination_lid; in build_mlx_header()
2380 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY; in build_mlx_header()
2381 sqp->ud_header.immediate_present = 0; in build_mlx_header()
2384 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE; in build_mlx_header()
2385 sqp->ud_header.immediate_present = 1; in build_mlx_header()
2386 sqp->ud_header.immediate_data = wr->wr.ex.imm_data; in build_mlx_header()
2399 memcpy(sqp->ud_header.eth.dmac_h, ah->av.eth.mac, 6); in build_mlx_header()
2406 u64 mac = atomic64_read(&to_mdev(ib_dev)->iboe.mac[sqp->qp.port - 1]); in build_mlx_header()
2410 memcpy(sqp->ud_header.eth.smac_h, smac, ETH_ALEN); in build_mlx_header()
2413 memcpy(sqp->ud_header.eth.smac_h, ah->av.eth.s_mac, ETH_ALEN); in build_mlx_header()
2416 if (!memcmp(sqp->ud_header.eth.smac_h, sqp->ud_header.eth.dmac_h, 6)) in build_mlx_header()
2419 sqp->ud_header.eth.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE); in build_mlx_header()
2421 sqp->ud_header.vlan.type = cpu_to_be16(MLX4_IB_IBOE_ETHERTYPE); in build_mlx_header()
2422 sqp->ud_header.vlan.tag = cpu_to_be16(vlan | pcp); in build_mlx_header()
2425 sqp->ud_header.lrh.virtual_lane = !sqp->qp.ibqp.qp_num ? 15 : 0; in build_mlx_header()
2426 if (sqp->ud_header.lrh.destination_lid == IB_LID_PERMISSIVE) in build_mlx_header()
2427 sqp->ud_header.lrh.source_lid = IB_LID_PERMISSIVE; in build_mlx_header()
2429 sqp->ud_header.bth.solicited_event = !!(wr->wr.send_flags & IB_SEND_SOLICITED); in build_mlx_header()
2430 if (!sqp->qp.ibqp.qp_num) in build_mlx_header()
2431 err = ib_get_cached_pkey(ib_dev, sqp->qp.port, sqp->pkey_index, in build_mlx_header()
2434 err = ib_get_cached_pkey(ib_dev, sqp->qp.port, wr->pkey_index, in build_mlx_header()
2439 sqp->ud_header.bth.pkey = cpu_to_be16(pkey); in build_mlx_header()
2440 sqp->ud_header.bth.destination_qpn = cpu_to_be32(wr->remote_qpn); in build_mlx_header()
2441 sqp->ud_header.bth.psn = cpu_to_be32((sqp->send_psn++) & ((1 << 24) - 1)); in build_mlx_header()
2442 sqp->ud_header.deth.qkey = cpu_to_be32(wr->remote_qkey & 0x80000000 ? in build_mlx_header()
2443 sqp->qkey : wr->remote_qkey); in build_mlx_header()
2444 sqp->ud_header.deth.source_qpn = cpu_to_be32(sqp->qp.ibqp.qp_num); in build_mlx_header()
2446 header_size = ib_ud_header_pack(&sqp->ud_header, sqp->header_buf); in build_mlx_header()
2454 be32_to_cpu(((__be32 *) sqp->header_buf)[i])); in build_mlx_header()
2471 memcpy(inl + 1, sqp->header_buf, header_size); in build_mlx_header()
2475 memcpy(inl + 1, sqp->header_buf, spc); in build_mlx_header()
2478 memcpy(inl + 1, sqp->header_buf + spc, header_size - spc); in build_mlx_header()