Lines Matching full:wc
511 enum ib_qp_type dest_qpt, struct ib_wc *wc, in mlx4_ib_send_to_slave() argument
549 ret = ib_get_cached_pkey(&dev->ib_dev, port, wc->pkey_index, &cached_pkey); in mlx4_ib_send_to_slave()
552 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_send_to_slave()
553 wc->pkey_index, ret); in mlx4_ib_send_to_slave()
560 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_send_to_slave()
618 tun_mad->hdr.flags_src_qp = cpu_to_be32(wc->src_qp & 0xFFFFFF); in mlx4_ib_send_to_slave()
619 tun_mad->hdr.g_ml_path = (grh && (wc->wc_flags & IB_WC_GRH)) ? 0x80 : 0; in mlx4_ib_send_to_slave()
626 if (vlan != wc->vlan_id) in mlx4_ib_send_to_slave()
637 vlan = wc->vlan_id; in mlx4_ib_send_to_slave()
641 memcpy((char *)&tun_mad->hdr.mac_31_0, &(wc->smac[0]), 4); in mlx4_ib_send_to_slave()
642 memcpy((char *)&tun_mad->hdr.slid_mac_47_32, &(wc->smac[4]), 2); in mlx4_ib_send_to_slave()
644 tun_mad->hdr.sl_vid = cpu_to_be16(((u16)(wc->sl)) << 12); in mlx4_ib_send_to_slave()
645 tun_mad->hdr.slid_mac_47_32 = ib_lid_be16(wc->slid); in mlx4_ib_send_to_slave()
682 struct ib_wc *wc, struct ib_grh *grh, in mlx4_ib_demux_mad() argument
702 if (!(wc->wc_flags & IB_WC_GRH)) { in mlx4_ib_demux_mad()
733 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); in mlx4_ib_demux_mad()
736 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_demux_mad()
753 if (wc->wc_flags & IB_WC_GRH) { in mlx4_ib_demux_mad()
813 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); in mlx4_ib_demux_mad()
816 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_demux_mad()
1475 static void mlx4_ib_multiplex_mad(struct mlx4_ib_demux_pv_ctx *ctx, struct ib_wc *wc) in mlx4_ib_multiplex_mad() argument
1478 struct mlx4_ib_demux_pv_qp *tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc->wr_id)]; in mlx4_ib_multiplex_mad()
1479 int wr_ix = wc->wr_id & (MLX4_NUM_TUNNEL_BUFS - 1); in mlx4_ib_multiplex_mad()
1492 if (wc->src_qp < dev->dev->phys_caps.base_proxy_sqpn || in mlx4_ib_multiplex_mad()
1493 wc->src_qp >= dev->dev->phys_caps.base_proxy_sqpn + 8 * MLX4_MFUNC_MAX || in mlx4_ib_multiplex_mad()
1494 (wc->src_qp & 0x1) != ctx->port - 1 || in mlx4_ib_multiplex_mad()
1495 wc->src_qp & 0x4) { in mlx4_ib_multiplex_mad()
1496 mlx4_ib_warn(ctx->ib_dev, "can't multiplex bad sqp:%d\n", wc->src_qp); in mlx4_ib_multiplex_mad()
1499 slave = ((wc->src_qp & ~0x7) - dev->dev->phys_caps.base_proxy_sqpn) / 8; in mlx4_ib_multiplex_mad()
1502 "belongs to another slave\n", wc->src_qp); in mlx4_ib_multiplex_mad()
1587 is_proxy_qp0(dev, wc->src_qp, slave) ? in mlx4_ib_multiplex_mad()
1592 &ah_attr, wc->smac, vlan_id, &tunnel->mad); in mlx4_ib_multiplex_mad()
1595 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_multiplex_mad()
1737 struct ib_wc wc; in mlx4_ib_tunnel_comp_worker() local
1742 while (ib_poll_cq(ctx->cq, 1, &wc) == 1) { in mlx4_ib_tunnel_comp_worker()
1743 tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc.wr_id)]; in mlx4_ib_tunnel_comp_worker()
1744 if (wc.status == IB_WC_SUCCESS) { in mlx4_ib_tunnel_comp_worker()
1745 switch (wc.opcode) { in mlx4_ib_tunnel_comp_worker()
1747 mlx4_ib_multiplex_mad(ctx, &wc); in mlx4_ib_tunnel_comp_worker()
1749 wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1753 "buf:%lld\n", wc.wr_id); in mlx4_ib_tunnel_comp_worker()
1756 rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1758 tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_tunnel_comp_worker()
1771 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_tunnel_comp_worker()
1772 if (!MLX4_TUN_IS_RECV(wc.wr_id)) { in mlx4_ib_tunnel_comp_worker()
1773 rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1775 tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_tunnel_comp_worker()
1899 struct ib_wc wc; in mlx4_ib_sqp_comp_worker() local
1906 while (mlx4_ib_poll_cq(ctx->cq, 1, &wc) == 1) { in mlx4_ib_sqp_comp_worker()
1907 sqp = &ctx->qp[MLX4_TUN_WRID_QPN(wc.wr_id)]; in mlx4_ib_sqp_comp_worker()
1908 if (wc.status == IB_WC_SUCCESS) { in mlx4_ib_sqp_comp_worker()
1909 switch (wc.opcode) { in mlx4_ib_sqp_comp_worker()
1911 kfree(sqp->tx_ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1913 sqp->tx_ring[wc.wr_id & (MLX4_NUM_WIRE_BUFS - 1)].ah in mlx4_ib_sqp_comp_worker()
1921 (sqp->ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1924 (sqp->ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1926 mlx4_ib_demux_mad(ctx->ib_dev, ctx->port, &wc, grh, mad); in mlx4_ib_sqp_comp_worker()
1927 if (mlx4_ib_post_pv_qp_buf(ctx, sqp, wc.wr_id & in mlx4_ib_sqp_comp_worker()
1930 "buf:%lld\n", wc.wr_id); in mlx4_ib_sqp_comp_worker()
1938 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_sqp_comp_worker()
1939 if (!MLX4_TUN_IS_RECV(wc.wr_id)) { in mlx4_ib_sqp_comp_worker()
1940 kfree(sqp->tx_ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1942 sqp->tx_ring[wc.wr_id & (MLX4_NUM_WIRE_BUFS - 1)].ah in mlx4_ib_sqp_comp_worker()