• Home
  • Raw
  • Download

Lines Matching refs:sqp

696 	struct mlx4_ib_sqp *sqp;  in mlx4_ib_create_qp()  local
738 sqp = kzalloc(sizeof *sqp, GFP_KERNEL); in mlx4_ib_create_qp()
739 if (!sqp) in mlx4_ib_create_qp()
742 qp = &sqp->qp; in mlx4_ib_create_qp()
750 kfree(sqp); in mlx4_ib_create_qp()
827 static void store_sqp_attrs(struct mlx4_ib_sqp *sqp, const struct ib_qp_attr *attr, in store_sqp_attrs() argument
831 sqp->pkey_index = attr->pkey_index; in store_sqp_attrs()
833 sqp->qkey = attr->qkey; in store_sqp_attrs()
835 sqp->send_psn = attr->sq_psn; in store_sqp_attrs()
1209 static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, in build_mlx_header() argument
1212 struct ib_device *ib_dev = &to_mdev(sqp->qp.ibqp.device)->ib_dev; in build_mlx_header()
1226 ib_ud_header_init(send_size, mlx4_ib_ah_grh_present(ah), &sqp->ud_header); in build_mlx_header()
1228 sqp->ud_header.lrh.service_level = in build_mlx_header()
1230 sqp->ud_header.lrh.destination_lid = ah->av.dlid; in build_mlx_header()
1231 sqp->ud_header.lrh.source_lid = cpu_to_be16(ah->av.g_slid & 0x7f); in build_mlx_header()
1233 sqp->ud_header.grh.traffic_class = in build_mlx_header()
1235 sqp->ud_header.grh.flow_label = in build_mlx_header()
1237 sqp->ud_header.grh.hop_limit = ah->av.hop_limit; in build_mlx_header()
1239 ah->av.gid_index, &sqp->ud_header.grh.source_gid); in build_mlx_header()
1240 memcpy(sqp->ud_header.grh.destination_gid.raw, in build_mlx_header()
1245 mlx->flags |= cpu_to_be32((!sqp->qp.ibqp.qp_num ? MLX4_WQE_MLX_VL15 : 0) | in build_mlx_header()
1246 (sqp->ud_header.lrh.destination_lid == in build_mlx_header()
1248 (sqp->ud_header.lrh.service_level << 8)); in build_mlx_header()
1249 mlx->rlid = sqp->ud_header.lrh.destination_lid; in build_mlx_header()
1253 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY; in build_mlx_header()
1254 sqp->ud_header.immediate_present = 0; in build_mlx_header()
1257 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE; in build_mlx_header()
1258 sqp->ud_header.immediate_present = 1; in build_mlx_header()
1259 sqp->ud_header.immediate_data = wr->ex.imm_data; in build_mlx_header()
1265 sqp->ud_header.lrh.virtual_lane = !sqp->qp.ibqp.qp_num ? 15 : 0; in build_mlx_header()
1266 if (sqp->ud_header.lrh.destination_lid == IB_LID_PERMISSIVE) in build_mlx_header()
1267 sqp->ud_header.lrh.source_lid = IB_LID_PERMISSIVE; in build_mlx_header()
1268 sqp->ud_header.bth.solicited_event = !!(wr->send_flags & IB_SEND_SOLICITED); in build_mlx_header()
1269 if (!sqp->qp.ibqp.qp_num) in build_mlx_header()
1270 ib_get_cached_pkey(ib_dev, sqp->qp.port, sqp->pkey_index, &pkey); in build_mlx_header()
1272 ib_get_cached_pkey(ib_dev, sqp->qp.port, wr->wr.ud.pkey_index, &pkey); in build_mlx_header()
1273 sqp->ud_header.bth.pkey = cpu_to_be16(pkey); in build_mlx_header()
1274 sqp->ud_header.bth.destination_qpn = cpu_to_be32(wr->wr.ud.remote_qpn); in build_mlx_header()
1275 sqp->ud_header.bth.psn = cpu_to_be32((sqp->send_psn++) & ((1 << 24) - 1)); in build_mlx_header()
1276 sqp->ud_header.deth.qkey = cpu_to_be32(wr->wr.ud.remote_qkey & 0x80000000 ? in build_mlx_header()
1277 sqp->qkey : wr->wr.ud.remote_qkey); in build_mlx_header()
1278 sqp->ud_header.deth.source_qpn = cpu_to_be32(sqp->qp.ibqp.qp_num); in build_mlx_header()
1280 header_size = ib_ud_header_pack(&sqp->ud_header, sqp->header_buf); in build_mlx_header()
1288 be32_to_cpu(((__be32 *) sqp->header_buf)[i])); in build_mlx_header()
1305 memcpy(inl + 1, sqp->header_buf, header_size); in build_mlx_header()
1309 memcpy(inl + 1, sqp->header_buf, spc); in build_mlx_header()
1312 memcpy(inl + 1, sqp->header_buf + spc, header_size - spc); in build_mlx_header()