Lines Matching refs:rds_ibdev

174 	err = rds_ib_update_ipaddr(ic->rds_ibdev, &conn->c_laddr);  in rds_ib_cm_connect_complete()
199 struct rds_ib_device *rds_ibdev = ic->rds_ibdev; in rds_ib_cm_fill_conn_param() local
204 min_t(u32, rds_ibdev->max_responder_resources, max_responder_resources); in rds_ib_cm_fill_conn_param()
206 min_t(u32, rds_ibdev->max_initiator_depth, max_initiator_depth); in rds_ib_cm_fill_conn_param()
351 struct rds_ib_device *rds_ibdev = ic->rds_ibdev; in rds_ib_tasklet_fn_recv() local
354 if (!rds_ibdev) in rds_ib_tasklet_fn_recv()
413 static inline int ibdev_get_unused_vector(struct rds_ib_device *rds_ibdev) in ibdev_get_unused_vector() argument
415 int min = rds_ibdev->vector_load[rds_ibdev->dev->num_comp_vectors - 1]; in ibdev_get_unused_vector()
416 int index = rds_ibdev->dev->num_comp_vectors - 1; in ibdev_get_unused_vector()
419 for (i = rds_ibdev->dev->num_comp_vectors - 1; i >= 0; i--) { in ibdev_get_unused_vector()
420 if (rds_ibdev->vector_load[i] < min) { in ibdev_get_unused_vector()
422 min = rds_ibdev->vector_load[i]; in ibdev_get_unused_vector()
426 rds_ibdev->vector_load[index]++; in ibdev_get_unused_vector()
430 static inline void ibdev_put_vector(struct rds_ib_device *rds_ibdev, int index) in ibdev_put_vector() argument
432 rds_ibdev->vector_load[index]--; in ibdev_put_vector()
445 struct rds_ib_device *rds_ibdev; in rds_ib_setup_qp() local
452 rds_ibdev = rds_ib_get_client_data(dev); in rds_ib_setup_qp()
453 if (!rds_ibdev) in rds_ib_setup_qp()
460 fr_queue_space = rds_ibdev->use_fastreg ? in rds_ib_setup_qp()
466 rds_ib_add_conn(rds_ibdev, conn); in rds_ib_setup_qp()
468 if (rds_ibdev->max_wrs < ic->i_send_ring.w_nr + 1) in rds_ib_setup_qp()
469 rds_ib_ring_resize(&ic->i_send_ring, rds_ibdev->max_wrs - 1); in rds_ib_setup_qp()
470 if (rds_ibdev->max_wrs < ic->i_recv_ring.w_nr + 1) in rds_ib_setup_qp()
471 rds_ib_ring_resize(&ic->i_recv_ring, rds_ibdev->max_wrs - 1); in rds_ib_setup_qp()
474 ic->i_pd = rds_ibdev->pd; in rds_ib_setup_qp()
476 ic->i_scq_vector = ibdev_get_unused_vector(rds_ibdev); in rds_ib_setup_qp()
485 ibdev_put_vector(rds_ibdev, ic->i_scq_vector); in rds_ib_setup_qp()
490 ic->i_rcq_vector = ibdev_get_unused_vector(rds_ibdev); in rds_ib_setup_qp()
499 ibdev_put_vector(rds_ibdev, ic->i_rcq_vector); in rds_ib_setup_qp()
523 attr.cap.max_send_sge = rds_ibdev->max_sge; in rds_ib_setup_qp()
617 rds_ib_remove_conn(rds_ibdev, conn); in rds_ib_setup_qp()
619 rds_ib_dev_put(rds_ibdev); in rds_ib_setup_qp()
1013 if (ic->rds_ibdev) in rds_ib_conn_path_shutdown()
1014 ibdev_put_vector(ic->rds_ibdev, ic->i_scq_vector); in rds_ib_conn_path_shutdown()
1019 if (ic->rds_ibdev) in rds_ib_conn_path_shutdown()
1020 ibdev_put_vector(ic->rds_ibdev, ic->i_rcq_vector); in rds_ib_conn_path_shutdown()
1053 if (ic->rds_ibdev) in rds_ib_conn_path_shutdown()
1054 rds_ib_remove_conn(ic->rds_ibdev, conn); in rds_ib_conn_path_shutdown()
1064 BUG_ON(ic->rds_ibdev); in rds_ib_conn_path_shutdown()
1165 lock_ptr = ic->rds_ibdev ? &ic->rds_ibdev->spinlock : &ib_nodev_conns_lock; in rds_ib_conn_free()