tun_qp            511 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_ib_demux_pv_qp *tun_qp;
tun_qp            533 drivers/infiniband/hw/mlx4/mad.c 		tun_qp = &tun_ctx->qp[0];
tun_qp            535 drivers/infiniband/hw/mlx4/mad.c 		tun_qp = &tun_ctx->qp[1];
tun_qp            554 drivers/infiniband/hw/mlx4/mad.c 	src_qp = tun_qp->qp;
tun_qp            575 drivers/infiniband/hw/mlx4/mad.c 	spin_lock(&tun_qp->tx_lock);
tun_qp            576 drivers/infiniband/hw/mlx4/mad.c 	if (tun_qp->tx_ix_head - tun_qp->tx_ix_tail >=
tun_qp            580 drivers/infiniband/hw/mlx4/mad.c 		tun_tx_ix = (++tun_qp->tx_ix_head) & (MLX4_NUM_TUNNEL_BUFS - 1);
tun_qp            581 drivers/infiniband/hw/mlx4/mad.c 	spin_unlock(&tun_qp->tx_lock);
tun_qp            585 drivers/infiniband/hw/mlx4/mad.c 	tun_mad = (struct mlx4_rcv_tunnel_mad *) (tun_qp->tx_ring[tun_tx_ix].buf.addr);
tun_qp            586 drivers/infiniband/hw/mlx4/mad.c 	if (tun_qp->tx_ring[tun_tx_ix].ah)
tun_qp            587 drivers/infiniband/hw/mlx4/mad.c 		rdma_destroy_ah(tun_qp->tx_ring[tun_tx_ix].ah, 0);
tun_qp            588 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->tx_ring[tun_tx_ix].ah = ah;
tun_qp            590 drivers/infiniband/hw/mlx4/mad.c 				   tun_qp->tx_ring[tun_tx_ix].buf.map,
tun_qp            632 drivers/infiniband/hw/mlx4/mad.c 				      tun_qp->tx_ring[tun_tx_ix].buf.map,
tun_qp            636 drivers/infiniband/hw/mlx4/mad.c 	list.addr = tun_qp->tx_ring[tun_tx_ix].buf.map;
tun_qp            655 drivers/infiniband/hw/mlx4/mad.c 	spin_lock(&tun_qp->tx_lock);
tun_qp            656 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->tx_ix_tail++;
tun_qp            657 drivers/infiniband/hw/mlx4/mad.c 	spin_unlock(&tun_qp->tx_lock);
tun_qp            658 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->tx_ring[tun_tx_ix].ah = NULL;
tun_qp           1311 drivers/infiniband/hw/mlx4/mad.c 				  struct mlx4_ib_demux_pv_qp *tun_qp,
tun_qp           1319 drivers/infiniband/hw/mlx4/mad.c 	size = (tun_qp->qp->qp_type == IB_QPT_UD) ?
tun_qp           1322 drivers/infiniband/hw/mlx4/mad.c 	sg_list.addr = tun_qp->ring[index].map;
tun_qp           1330 drivers/infiniband/hw/mlx4/mad.c 		MLX4_TUN_SET_WRID_QPN(tun_qp->proxy_qpt);
tun_qp           1331 drivers/infiniband/hw/mlx4/mad.c 	ib_dma_sync_single_for_device(ctx->ib_dev, tun_qp->ring[index].map,
tun_qp           1333 drivers/infiniband/hw/mlx4/mad.c 	return ib_post_recv(tun_qp->qp, &recv_wr, &bad_recv_wr);
tun_qp           1484 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_ib_demux_pv_qp *tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc->wr_id)];
tun_qp           1486 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_tunnel_mad *tunnel = tun_qp->ring[wr_ix].addr;
tun_qp           1512 drivers/infiniband/hw/mlx4/mad.c 	ib_dma_sync_single_for_cpu(ctx->ib_dev, tun_qp->ring[wr_ix].map,
tun_qp           1604 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_ib_demux_pv_qp *tun_qp;
tun_qp           1610 drivers/infiniband/hw/mlx4/mad.c 	tun_qp = &ctx->qp[qp_type];
tun_qp           1612 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->ring = kcalloc(MLX4_NUM_TUNNEL_BUFS,
tun_qp           1615 drivers/infiniband/hw/mlx4/mad.c 	if (!tun_qp->ring)
tun_qp           1618 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->tx_ring = kcalloc(MLX4_NUM_TUNNEL_BUFS,
tun_qp           1621 drivers/infiniband/hw/mlx4/mad.c 	if (!tun_qp->tx_ring) {
tun_qp           1622 drivers/infiniband/hw/mlx4/mad.c 		kfree(tun_qp->ring);
tun_qp           1623 drivers/infiniband/hw/mlx4/mad.c 		tun_qp->ring = NULL;
tun_qp           1636 drivers/infiniband/hw/mlx4/mad.c 		tun_qp->ring[i].addr = kmalloc(rx_buf_size, GFP_KERNEL);
tun_qp           1637 drivers/infiniband/hw/mlx4/mad.c 		if (!tun_qp->ring[i].addr)
tun_qp           1639 drivers/infiniband/hw/mlx4/mad.c 		tun_qp->ring[i].map = ib_dma_map_single(ctx->ib_dev,
tun_qp           1640 drivers/infiniband/hw/mlx4/mad.c 							tun_qp->ring[i].addr,
tun_qp           1643 drivers/infiniband/hw/mlx4/mad.c 		if (ib_dma_mapping_error(ctx->ib_dev, tun_qp->ring[i].map)) {
tun_qp           1644 drivers/infiniband/hw/mlx4/mad.c 			kfree(tun_qp->ring[i].addr);
tun_qp           1650 drivers/infiniband/hw/mlx4/mad.c 		tun_qp->tx_ring[i].buf.addr =
tun_qp           1652 drivers/infiniband/hw/mlx4/mad.c 		if (!tun_qp->tx_ring[i].buf.addr)
tun_qp           1654 drivers/infiniband/hw/mlx4/mad.c 		tun_qp->tx_ring[i].buf.map =
tun_qp           1656 drivers/infiniband/hw/mlx4/mad.c 					  tun_qp->tx_ring[i].buf.addr,
tun_qp           1660 drivers/infiniband/hw/mlx4/mad.c 					 tun_qp->tx_ring[i].buf.map)) {
tun_qp           1661 drivers/infiniband/hw/mlx4/mad.c 			kfree(tun_qp->tx_ring[i].buf.addr);
tun_qp           1664 drivers/infiniband/hw/mlx4/mad.c 		tun_qp->tx_ring[i].ah = NULL;
tun_qp           1666 drivers/infiniband/hw/mlx4/mad.c 	spin_lock_init(&tun_qp->tx_lock);
tun_qp           1667 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->tx_ix_head = 0;
tun_qp           1668 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->tx_ix_tail = 0;
tun_qp           1669 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->proxy_qpt = qp_type;
tun_qp           1676 drivers/infiniband/hw/mlx4/mad.c 		ib_dma_unmap_single(ctx->ib_dev, tun_qp->tx_ring[i].buf.map,
tun_qp           1678 drivers/infiniband/hw/mlx4/mad.c 		kfree(tun_qp->tx_ring[i].buf.addr);
tun_qp           1684 drivers/infiniband/hw/mlx4/mad.c 		ib_dma_unmap_single(ctx->ib_dev, tun_qp->ring[i].map,
tun_qp           1686 drivers/infiniband/hw/mlx4/mad.c 		kfree(tun_qp->ring[i].addr);
tun_qp           1688 drivers/infiniband/hw/mlx4/mad.c 	kfree(tun_qp->tx_ring);
tun_qp           1689 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->tx_ring = NULL;
tun_qp           1690 drivers/infiniband/hw/mlx4/mad.c 	kfree(tun_qp->ring);
tun_qp           1691 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->ring = NULL;
tun_qp           1699 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_ib_demux_pv_qp *tun_qp;
tun_qp           1705 drivers/infiniband/hw/mlx4/mad.c 	tun_qp = &ctx->qp[qp_type];
tun_qp           1716 drivers/infiniband/hw/mlx4/mad.c 		ib_dma_unmap_single(ctx->ib_dev, tun_qp->ring[i].map,
tun_qp           1718 drivers/infiniband/hw/mlx4/mad.c 		kfree(tun_qp->ring[i].addr);
tun_qp           1722 drivers/infiniband/hw/mlx4/mad.c 		ib_dma_unmap_single(ctx->ib_dev, tun_qp->tx_ring[i].buf.map,
tun_qp           1724 drivers/infiniband/hw/mlx4/mad.c 		kfree(tun_qp->tx_ring[i].buf.addr);
tun_qp           1725 drivers/infiniband/hw/mlx4/mad.c 		if (tun_qp->tx_ring[i].ah)
tun_qp           1726 drivers/infiniband/hw/mlx4/mad.c 			rdma_destroy_ah(tun_qp->tx_ring[i].ah, 0);
tun_qp           1728 drivers/infiniband/hw/mlx4/mad.c 	kfree(tun_qp->tx_ring);
tun_qp           1729 drivers/infiniband/hw/mlx4/mad.c 	kfree(tun_qp->ring);
tun_qp           1735 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_ib_demux_pv_qp *tun_qp;
tun_qp           1742 drivers/infiniband/hw/mlx4/mad.c 		tun_qp = &ctx->qp[MLX4_TUN_WRID_QPN(wc.wr_id)];
tun_qp           1747 drivers/infiniband/hw/mlx4/mad.c 				ret = mlx4_ib_post_pv_qp_buf(ctx, tun_qp,
tun_qp           1758 drivers/infiniband/hw/mlx4/mad.c 				rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id &
tun_qp           1760 drivers/infiniband/hw/mlx4/mad.c 				tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah
tun_qp           1762 drivers/infiniband/hw/mlx4/mad.c 				spin_lock(&tun_qp->tx_lock);
tun_qp           1763 drivers/infiniband/hw/mlx4/mad.c 				tun_qp->tx_ix_tail++;
tun_qp           1764 drivers/infiniband/hw/mlx4/mad.c 				spin_unlock(&tun_qp->tx_lock);
tun_qp           1775 drivers/infiniband/hw/mlx4/mad.c 				rdma_destroy_ah(tun_qp->tx_ring[wc.wr_id &
tun_qp           1777 drivers/infiniband/hw/mlx4/mad.c 				tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah
tun_qp           1779 drivers/infiniband/hw/mlx4/mad.c 				spin_lock(&tun_qp->tx_lock);
tun_qp           1780 drivers/infiniband/hw/mlx4/mad.c 				tun_qp->tx_ix_tail++;
tun_qp           1781 drivers/infiniband/hw/mlx4/mad.c 				spin_unlock(&tun_qp->tx_lock);
tun_qp           1800 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_ib_demux_pv_qp *tun_qp;
tun_qp           1808 drivers/infiniband/hw/mlx4/mad.c 	tun_qp = &ctx->qp[qp_type];
tun_qp           1834 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->qp = ib_create_qp(ctx->pd, &qp_init_attr.init_attr);
tun_qp           1835 drivers/infiniband/hw/mlx4/mad.c 	if (IS_ERR(tun_qp->qp)) {
tun_qp           1836 drivers/infiniband/hw/mlx4/mad.c 		ret = PTR_ERR(tun_qp->qp);
tun_qp           1837 drivers/infiniband/hw/mlx4/mad.c 		tun_qp->qp = NULL;
tun_qp           1855 drivers/infiniband/hw/mlx4/mad.c 	ret = ib_modify_qp(tun_qp->qp, &attr, qp_attr_mask_INIT);
tun_qp           1862 drivers/infiniband/hw/mlx4/mad.c 	ret = ib_modify_qp(tun_qp->qp, &attr, IB_QP_STATE);
tun_qp           1870 drivers/infiniband/hw/mlx4/mad.c 	ret = ib_modify_qp(tun_qp->qp, &attr, IB_QP_STATE | IB_QP_SQ_PSN);
tun_qp           1878 drivers/infiniband/hw/mlx4/mad.c 		ret = mlx4_ib_post_pv_qp_buf(ctx, tun_qp, i);
tun_qp           1888 drivers/infiniband/hw/mlx4/mad.c 	ib_destroy_qp(tun_qp->qp);
tun_qp           1889 drivers/infiniband/hw/mlx4/mad.c 	tun_qp->qp = NULL;