• Home
  • Raw
  • Download

Lines Matching refs:wc

512 			  enum ib_qp_type dest_qpt, struct ib_wc *wc,  in mlx4_ib_send_to_slave()  argument
550 ret = ib_get_cached_pkey(&dev->ib_dev, port, wc->pkey_index, &cached_pkey); in mlx4_ib_send_to_slave()
553 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_send_to_slave()
554 wc->pkey_index, ret); in mlx4_ib_send_to_slave()
561 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_send_to_slave()
619 tun_mad->hdr.flags_src_qp = cpu_to_be32(wc->src_qp & 0xFFFFFF); in mlx4_ib_send_to_slave()
620 tun_mad->hdr.g_ml_path = (grh && (wc->wc_flags & IB_WC_GRH)) ? 0x80 : 0; in mlx4_ib_send_to_slave()
627 if (vlan != wc->vlan_id) in mlx4_ib_send_to_slave()
638 vlan = wc->vlan_id; in mlx4_ib_send_to_slave()
642 memcpy((char *)&tun_mad->hdr.mac_31_0, &(wc->smac[0]), 4); in mlx4_ib_send_to_slave()
643 memcpy((char *)&tun_mad->hdr.slid_mac_47_32, &(wc->smac[4]), 2); in mlx4_ib_send_to_slave()
645 tun_mad->hdr.sl_vid = cpu_to_be16(((u16)(wc->sl)) << 12); in mlx4_ib_send_to_slave()
646 tun_mad->hdr.slid_mac_47_32 = ib_lid_be16(wc->slid); in mlx4_ib_send_to_slave()
683 struct ib_wc *wc, struct ib_grh *grh, in mlx4_ib_demux_mad() argument
703 if (!(wc->wc_flags & IB_WC_GRH)) { in mlx4_ib_demux_mad()
734 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); in mlx4_ib_demux_mad()
737 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_demux_mad()
754 if (wc->wc_flags & IB_WC_GRH) { in mlx4_ib_demux_mad()
814 err = mlx4_ib_send_to_slave(dev, slave, port, wc->qp->qp_type, wc, grh, mad); in mlx4_ib_demux_mad()
817 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_demux_mad()
1477 static void mlx4_ib_multiplex_mad(struct mlx4_ib_demux_pv_ctx *ctx, struct ib_wc *wc) in mlx4_ib_multiplex_mad() argument
1480 struct mlx4_ib_demux_pv_qp *tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc->wr_id)]; in mlx4_ib_multiplex_mad()
1481 int wr_ix = wc->wr_id & (MLX4_NUM_TUNNEL_BUFS - 1); in mlx4_ib_multiplex_mad()
1494 if (wc->src_qp < dev->dev->phys_caps.base_proxy_sqpn || in mlx4_ib_multiplex_mad()
1495 wc->src_qp >= dev->dev->phys_caps.base_proxy_sqpn + 8 * MLX4_MFUNC_MAX || in mlx4_ib_multiplex_mad()
1496 (wc->src_qp & 0x1) != ctx->port - 1 || in mlx4_ib_multiplex_mad()
1497 wc->src_qp & 0x4) { in mlx4_ib_multiplex_mad()
1498 mlx4_ib_warn(ctx->ib_dev, "can't multiplex bad sqp:%d\n", wc->src_qp); in mlx4_ib_multiplex_mad()
1501 slave = ((wc->src_qp & ~0x7) - dev->dev->phys_caps.base_proxy_sqpn) / 8; in mlx4_ib_multiplex_mad()
1504 "belongs to another slave\n", wc->src_qp); in mlx4_ib_multiplex_mad()
1590 is_proxy_qp0(dev, wc->src_qp, slave) ? in mlx4_ib_multiplex_mad()
1595 &ah_attr, wc->smac, vlan_id, &tunnel->mad); in mlx4_ib_multiplex_mad()
1598 is_proxy_qp0(dev, wc->src_qp, slave) ? "SMI" : "GSI", in mlx4_ib_multiplex_mad()
1740 struct ib_wc wc; in mlx4_ib_tunnel_comp_worker() local
1745 while (ib_poll_cq(ctx->cq, 1, &wc) == 1) { in mlx4_ib_tunnel_comp_worker()
1746 tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc.wr_id)]; in mlx4_ib_tunnel_comp_worker()
1747 if (wc.status == IB_WC_SUCCESS) { in mlx4_ib_tunnel_comp_worker()
1748 switch (wc.opcode) { in mlx4_ib_tunnel_comp_worker()
1750 mlx4_ib_multiplex_mad(ctx, &wc); in mlx4_ib_tunnel_comp_worker()
1752 wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1756 "buf:%lld\n", wc.wr_id); in mlx4_ib_tunnel_comp_worker()
1759 rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1761 tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_tunnel_comp_worker()
1774 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_tunnel_comp_worker()
1775 if (!MLX4_TUN_IS_RECV(wc.wr_id)) { in mlx4_ib_tunnel_comp_worker()
1776 rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id & in mlx4_ib_tunnel_comp_worker()
1778 tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah in mlx4_ib_tunnel_comp_worker()
1902 struct ib_wc wc; in mlx4_ib_sqp_comp_worker() local
1909 while (mlx4_ib_poll_cq(ctx->cq, 1, &wc) == 1) { in mlx4_ib_sqp_comp_worker()
1910 sqp = &ctx->qp[MLX4_TUN_WRID_QPN(wc.wr_id)]; in mlx4_ib_sqp_comp_worker()
1911 if (wc.status == IB_WC_SUCCESS) { in mlx4_ib_sqp_comp_worker()
1912 switch (wc.opcode) { in mlx4_ib_sqp_comp_worker()
1914 kfree(sqp->tx_ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1916 sqp->tx_ring[wc.wr_id & (MLX4_NUM_WIRE_BUFS - 1)].ah in mlx4_ib_sqp_comp_worker()
1924 (sqp->ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1927 (sqp->ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1929 mlx4_ib_demux_mad(ctx->ib_dev, ctx->port, &wc, grh, mad); in mlx4_ib_sqp_comp_worker()
1930 if (mlx4_ib_post_pv_qp_buf(ctx, sqp, wc.wr_id & in mlx4_ib_sqp_comp_worker()
1933 "buf:%lld\n", wc.wr_id); in mlx4_ib_sqp_comp_worker()
1941 ctx->slave, wc.status, wc.wr_id); in mlx4_ib_sqp_comp_worker()
1942 if (!MLX4_TUN_IS_RECV(wc.wr_id)) { in mlx4_ib_sqp_comp_worker()
1943 kfree(sqp->tx_ring[wc.wr_id & in mlx4_ib_sqp_comp_worker()
1945 sqp->tx_ring[wc.wr_id & (MLX4_NUM_WIRE_BUFS - 1)].ah in mlx4_ib_sqp_comp_worker()