This should be enabled back after IB_CQ_VECTOR_LEAST_ATTACHED is added.
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
unsigned int rds_ib_haip_fallback = 1;
unsigned int rds_ib_apm_timeout = RDS_IB_DEFAULT_TIMEOUT;
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_haip_failover_groups = NULL;
module_param(rds_ib_fmr_1m_pool_size, int, 0444);
module_param(rds_ib_haip_failover_groups, charp, 0444);
MODULE_PARM_DESC(rds_ib_haip_failover_groups,
"<ifname>[,<ifname>]*[;<ifname>[,<ifname>]*]*");
+#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
/*
* we have a clumsy combination of RCU and a rwsem protecting this list
extern unsigned int rds_ib_haip_fallback;
extern unsigned int rds_ib_haip_failover_enabled;
extern unsigned int rds_ib_apm_timeout;
+#if IB_RDS_CQ_VECTOR_SUPPORTED
extern unsigned int rds_ib_cq_balance_enabled;
+#endif
extern spinlock_t ib_nodev_conns_lock;
extern struct list_head ib_nodev_conns;
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) {
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;
}
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;
}
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
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
ib_destroy_cq(ic->i_scq);
}
#define RDS_PROTOCOL_MINOR(v) ((v) & 255)
#define RDS_PROTOCOL(maj, min) (((maj) << 8) | min)
+#define IB_RDS_CQ_VECTOR_SUPPORTED 0
+
/*
* XXX randomly chosen, but at least seems to be unused:
* # 18464-18768 Unassigned