Lines Matching refs:rds_ibdev
146 err = rds_ib_update_ipaddr(ic->rds_ibdev, &conn->c_laddr); in rds_ib_cm_connect_complete()
172 struct rds_ib_device *rds_ibdev = ic->rds_ibdev; in rds_ib_cm_fill_conn_param() local
177 min_t(u32, rds_ibdev->max_responder_resources, max_responder_resources); in rds_ib_cm_fill_conn_param()
179 min_t(u32, rds_ibdev->max_initiator_depth, max_initiator_depth); in rds_ib_cm_fill_conn_param()
326 struct rds_ib_device *rds_ibdev = ic->rds_ibdev; in rds_ib_tasklet_fn_recv() local
329 if (!rds_ibdev) in rds_ib_tasklet_fn_recv()
387 static inline int ibdev_get_unused_vector(struct rds_ib_device *rds_ibdev) in ibdev_get_unused_vector() argument
389 int min = rds_ibdev->vector_load[rds_ibdev->dev->num_comp_vectors - 1]; in ibdev_get_unused_vector()
390 int index = rds_ibdev->dev->num_comp_vectors - 1; in ibdev_get_unused_vector()
393 for (i = rds_ibdev->dev->num_comp_vectors - 1; i >= 0; i--) { in ibdev_get_unused_vector()
394 if (rds_ibdev->vector_load[i] < min) { in ibdev_get_unused_vector()
396 min = rds_ibdev->vector_load[i]; in ibdev_get_unused_vector()
400 rds_ibdev->vector_load[index]++; in ibdev_get_unused_vector()
404 static inline void ibdev_put_vector(struct rds_ib_device *rds_ibdev, int index) in ibdev_put_vector() argument
406 rds_ibdev->vector_load[index]--; in ibdev_put_vector()
508 struct rds_ib_device *rds_ibdev; in rds_ib_setup_qp() local
516 rds_ibdev = rds_ib_get_client_data(dev); in rds_ib_setup_qp()
517 if (!rds_ibdev) in rds_ib_setup_qp()
527 rds_ib_add_conn(rds_ibdev, conn); in rds_ib_setup_qp()
529 max_wrs = rds_ibdev->max_wrs < rds_ib_sysctl_max_send_wr + 1 ? in rds_ib_setup_qp()
530 rds_ibdev->max_wrs - 1 : rds_ib_sysctl_max_send_wr; in rds_ib_setup_qp()
534 max_wrs = rds_ibdev->max_wrs < rds_ib_sysctl_max_recv_wr + 1 ? in rds_ib_setup_qp()
535 rds_ibdev->max_wrs - 1 : rds_ib_sysctl_max_recv_wr; in rds_ib_setup_qp()
540 ic->i_pd = rds_ibdev->pd; in rds_ib_setup_qp()
542 ic->i_scq_vector = ibdev_get_unused_vector(rds_ibdev); in rds_ib_setup_qp()
551 ibdev_put_vector(rds_ibdev, ic->i_scq_vector); in rds_ib_setup_qp()
556 ic->i_rcq_vector = ibdev_get_unused_vector(rds_ibdev); in rds_ib_setup_qp()
565 ibdev_put_vector(rds_ibdev, ic->i_rcq_vector); in rds_ib_setup_qp()
589 attr.cap.max_send_sge = rds_ibdev->max_sge; in rds_ib_setup_qp()
606 ic->i_send_hdrs = rds_dma_hdrs_alloc(rds_ibdev, &ic->i_send_hdrs_dma, in rds_ib_setup_qp()
615 ic->i_recv_hdrs = rds_dma_hdrs_alloc(rds_ibdev, &ic->i_recv_hdrs_dma, in rds_ib_setup_qp()
624 ic->i_ack = rds_dma_hdr_alloc(rds_ibdev->dev, &ic->i_ack_dma, in rds_ib_setup_qp()
661 rds_dma_hdr_free(rds_ibdev->dev, ic->i_ack, ic->i_ack_dma, in rds_ib_setup_qp()
666 rds_dma_hdrs_free(rds_ibdev, ic->i_recv_hdrs, ic->i_recv_hdrs_dma, in rds_ib_setup_qp()
672 rds_dma_hdrs_free(rds_ibdev, ic->i_send_hdrs, ic->i_send_hdrs_dma, in rds_ib_setup_qp()
686 rds_ib_remove_conn(rds_ibdev, conn); in rds_ib_setup_qp()
688 rds_ib_dev_put(rds_ibdev); in rds_ib_setup_qp()
1095 if (ic->rds_ibdev) in rds_ib_conn_path_shutdown()
1096 ibdev_put_vector(ic->rds_ibdev, ic->i_scq_vector); in rds_ib_conn_path_shutdown()
1101 if (ic->rds_ibdev) in rds_ib_conn_path_shutdown()
1102 ibdev_put_vector(ic->rds_ibdev, ic->i_rcq_vector); in rds_ib_conn_path_shutdown()
1106 if (ic->rds_ibdev) { in rds_ib_conn_path_shutdown()
1109 rds_dma_hdrs_free(ic->rds_ibdev, in rds_ib_conn_path_shutdown()
1119 rds_dma_hdrs_free(ic->rds_ibdev, in rds_ib_conn_path_shutdown()
1129 rds_dma_hdr_free(ic->rds_ibdev->dev, ic->i_ack, in rds_ib_conn_path_shutdown()
1151 if (ic->rds_ibdev) in rds_ib_conn_path_shutdown()
1152 rds_ib_remove_conn(ic->rds_ibdev, conn); in rds_ib_conn_path_shutdown()
1159 BUG_ON(ic->rds_ibdev); in rds_ib_conn_path_shutdown()
1262 lock_ptr = ic->rds_ibdev ? &ic->rds_ibdev->spinlock : &ib_nodev_conns_lock; in rds_ib_conn_free()