unsigned int rds_ib_active_bonding_trigger_delay_max_msecs; /* = 0; */
unsigned int rds_ib_active_bonding_trigger_delay_min_msecs; /* = 0; */
unsigned int rds_ib_rnr_retry_count = RDS_IB_DEFAULT_RNR_RETRY_COUNT;
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-unsigned int rds_ib_cq_balance_enabled = 1;
-#endif
static char *rds_ib_active_bonding_failover_groups = NULL;
unsigned int rds_ib_active_bonding_arps = RDS_IB_DEFAULT_NUM_ARPS;
static char *rds_ib_active_bonding_excl_ips = "169.254/16,172.10/16";
MODULE_PARM_DESC(rds_ib_active_bonding_trigger_delay_min_msecs,
" Active Bonding Min delay before active "
"bonding is triggered(msecs)");
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-module_param(rds_ib_cq_balance_enabled, int, 0444);
-MODULE_PARM_DESC(rds_ib_cq_balance_enabled, " CQ load balance Enabled");
-#endif
module_param(rds_ib_active_bonding_arps, int, 0444);
MODULE_PARM_DESC(rds_ib_active_bonding_arps, " Num ARPs to be sent when IP moved");
module_param(rds_ib_active_bonding_excl_ips, charp, 0444);
}
}
-static int rds_ib_find_least_loaded_vector(struct rds_ib_device *rds_ibdev)
-{
- int i;
- int index = rds_ibdev->dev->num_comp_vectors - 1;
- int min = rds_ibdev->vector_load[rds_ibdev->dev->num_comp_vectors - 1];
-
-#if IB_RDS_CQ_VECTOR_SUPPORTED
- if (!rds_ib_cq_balance_enabled)
- return IB_CQ_VECTOR_LEAST_ATTACHED;
-#endif
-
- for (i = rds_ibdev->dev->num_comp_vectors - 1; i >= 0; i--) {
- if (rds_ibdev->vector_load[i] < min) {
- index = i;
- min = rds_ibdev->vector_load[i];
- }
- }
-
- rds_ibdev->vector_load[index]++;
- return index;
-}
-
/*
* This needs to be very careful to not leave IS_ERR pointers around for
* cleanup to trip over.
ic->i_pd = rds_ibdev->pd;
ic->i_mr = rds_ibdev->mr;
- ic->i_scq_vector = rds_ib_find_least_loaded_vector(rds_ibdev);
ic->i_scq = ib_create_cq(dev, rds_ib_cq_comp_handler_send,
rds_ib_cq_event_handler, conn,
- ic->i_send_ring.w_nr + 1,
- ic->i_scq_vector);
+ ic->i_send_ring.w_nr + 1, 0);
if (IS_ERR(ic->i_scq)) {
ret = PTR_ERR(ic->i_scq);
ic->i_scq = NULL;
rdsdebug("ib_create_cq send failed: %d\n", ret);
-#if IB_RDS_CQ_VECTOR_SUPPORTED
- if (ic->i_scq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
- rds_ibdev->vector_load[ic->i_scq_vector]--;
-#endif
goto out;
}
- ic->i_rcq_vector = rds_ib_find_least_loaded_vector(rds_ibdev);
if (rds_ib_srq_enabled)
ic->i_rcq = ib_create_cq(dev, rds_ib_cq_comp_handler_recv,
rds_ib_cq_event_handler, conn,
- rds_ib_srq_max_wr - 1,
- ic->i_rcq_vector);
+ rds_ib_srq_max_wr - 1, 0);
else
ic->i_rcq = ib_create_cq(dev, rds_ib_cq_comp_handler_recv,
rds_ib_cq_event_handler, conn,
- ic->i_recv_ring.w_nr,
- ic->i_rcq_vector);
+ ic->i_recv_ring.w_nr, 0);
if (IS_ERR(ic->i_rcq)) {
ret = PTR_ERR(ic->i_rcq);
ic->i_rcq = NULL;
rdsdebug("ib_create_cq recv failed: %d\n", ret);
-#if IB_RDS_CQ_VECTOR_SUPPORTED
- if (ic->i_scq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
- rds_ibdev->vector_load[ic->i_rcq_vector]--;
-#endif
goto out;
}
if (ic->i_cm_id->qp)
rdma_destroy_qp(ic->i_cm_id);
- if (ic->i_rcq) {
-#if IB_RDS_CQ_VECTOR_SUPPORTED
- if (ic->rds_ibdev &&
- ic->i_rcq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
- ic->rds_ibdev->vector_load[ic->i_rcq_vector]--;
-#endif
+ if (ic->i_rcq)
ib_destroy_cq(ic->i_rcq);
- }
- if (ic->i_scq) {
-#if IB_RDS_CQ_VECTOR_SUPPORTED
- if (ic->rds_ibdev &&
- ic->i_scq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
- ic->rds_ibdev->vector_load[ic->i_scq_vector]--;
-#endif
+ if (ic->i_scq)
ib_destroy_cq(ic->i_scq);
- }
/* then free the resources that ib callbacks use */
if (ic->i_send_hdrs)