Lines Matching refs:wc

462 			  enum ib_qp_type dest_qpt, struct ib_wc *wc,  in mlx4_ib_send_to_slave()  argument
497 ret = ib_get_cached_pkey(&dev->ib_dev, port, wc->pkey_index, &cached_pkey); in mlx4_ib_send_to_slave()
552 tun_mad->hdr.flags_src_qp = cpu_to_be32(wc->src_qp & 0xFFFFFF); in mlx4_ib_send_to_slave()
553 tun_mad->hdr.g_ml_path = (grh && (wc->wc_flags & IB_WC_GRH)) ? 0x80 : 0; in mlx4_ib_send_to_slave()
560 if (vlan != wc->vlan_id) in mlx4_ib_send_to_slave()
571 vlan = wc->vlan_id; in mlx4_ib_send_to_slave()
575 memcpy((char *)&tun_mad->hdr.mac_31_0, &(wc->smac[0]), 4); in mlx4_ib_send_to_slave()
576 memcpy((char *)&tun_mad->hdr.slid_mac_47_32, &(wc->smac[4]), 2); in mlx4_ib_send_to_slave()
578 tun_mad->hdr.sl_vid = cpu_to_be16(((u16)(wc->sl)) << 12); in mlx4_ib_send_to_slave()
579 tun_mad->hdr.slid_mac_47_32 = cpu_to_be16(wc->slid); in mlx4_ib_send_to_slave()
610 struct ib_wc *wc, struct ib_grh *grh, in mlx4_ib_demux_mad() argument
625 if (!(wc->wc_flags & IB_WC_GRH)) { in mlx4_ib_demux_mad()
646 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); in mlx4_ib_demux_mad()
665 if (wc->wc_flags & IB_WC_GRH) { in mlx4_ib_demux_mad()
717 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); in mlx4_ib_demux_mad()
1281 static void mlx4_ib_multiplex_mad(struct mlx4_ib_demux_pv_ctx *ctx, struct ib_wc *wc) in mlx4_ib_multiplex_mad() argument
1284 struct mlx4_ib_demux_pv_qp *tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc->wr_id)]; in mlx4_ib_multiplex_mad()
1285 int wr_ix = wc->wr_id & (MLX4_NUM_TUNNEL_BUFS - 1); in mlx4_ib_multiplex_mad()
1294 if (wc->src_qp < dev->dev->phys_caps.base_proxy_sqpn || in mlx4_ib_multiplex_mad()
1295 wc->src_qp >= dev->dev->phys_caps.base_proxy_sqpn + 8 * MLX4_MFUNC_MAX || in mlx4_ib_multiplex_mad()
1296 (wc->src_qp & 0x1) != ctx->port - 1 || in mlx4_ib_multiplex_mad()
1297 wc->src_qp & 0x4) { in mlx4_ib_multiplex_mad()
1298 mlx4_ib_warn(ctx->ib_dev, "can't multiplex bad sqp:%d\n", wc->src_qp); in mlx4_ib_multiplex_mad()
1301 slave = ((wc->src_qp & ~0x7) - dev->dev->phys_caps.base_proxy_sqpn) / 8; in mlx4_ib_multiplex_mad()
1304 "belongs to another slave\n", wc->src_qp); in mlx4_ib_multiplex_mad()
1383 is_proxy_qp0(dev, wc->src_qp, slave) ? in mlx4_ib_multiplex_mad()
1388 &ah_attr, wc->smac, &tunnel->mad); in mlx4_ib_multiplex_mad()
1526 struct ib_wc wc; in mlx4_ib_tunnel_comp_worker() local
1531 while (ib_poll_cq(ctx->cq, 1, &wc) == 1) { in mlx4_ib_tunnel_comp_worker()
1532 tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc.wr_id)]; in mlx4_ib_tunnel_comp_worker()
1533 if (wc.status == IB_WC_SUCCESS) { in mlx4_ib_tunnel_comp_worker()
1534 switch (wc.opcode) { in mlx4_ib_tunnel_comp_worker()
1536 mlx4_ib_multiplex_mad(ctx, &wc); in mlx4_ib_tunnel_comp_worker()
1538 wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1542 "buf:%lld\n", wc.wr_id); in mlx4_ib_tunnel_comp_worker()
1547 wc.wr_id, wc.status); in mlx4_ib_tunnel_comp_worker()
1548 ib_destroy_ah(tun_qp->tx_ring[wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1550 tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_tunnel_comp_worker()
1563 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_tunnel_comp_worker()
1564 if (!MLX4_TUN_IS_RECV(wc.wr_id)) { in mlx4_ib_tunnel_comp_worker()
1565 ib_destroy_ah(tun_qp->tx_ring[wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1567 tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_tunnel_comp_worker()
1690 struct ib_wc wc; in mlx4_ib_sqp_comp_worker() local
1697 while (mlx4_ib_poll_cq(ctx->cq, 1, &wc) == 1) { in mlx4_ib_sqp_comp_worker()
1698 sqp = &ctx->qp[MLX4_TUN_WRID_QPN(wc.wr_id)]; in mlx4_ib_sqp_comp_worker()
1699 if (wc.status == IB_WC_SUCCESS) { in mlx4_ib_sqp_comp_worker()
1700 switch (wc.opcode) { in mlx4_ib_sqp_comp_worker()
1702 ib_destroy_ah(sqp->tx_ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1704 sqp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_sqp_comp_worker()
1712 (sqp->ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1715 (sqp->ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1717 mlx4_ib_demux_mad(ctx->ib_dev, ctx->port, &wc, grh, mad); in mlx4_ib_sqp_comp_worker()
1718 if (mlx4_ib_post_pv_qp_buf(ctx, sqp, wc.wr_id & in mlx4_ib_sqp_comp_worker()
1721 "buf:%lld\n", wc.wr_id); in mlx4_ib_sqp_comp_worker()
1730 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_sqp_comp_worker()
1731 if (!MLX4_TUN_IS_RECV(wc.wr_id)) { in mlx4_ib_sqp_comp_worker()
1732 ib_destroy_ah(sqp->tx_ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1734 sqp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_sqp_comp_worker()