Skip to content

Commit 845a418

Browse files
gerd-rauschBrian Maly
authored andcommitted
Revert "net/rds: Use the same vector for send & receive"
This reverts commit 78341bfdbe53e306c2ae2ca41629b16e302c5a25. Orabug: 33590962 Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: John Donnelly <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent ea91c2c commit 845a418

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

net/rds/ib.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ struct rds_ib_connection {
328328
/* Active Bonding */
329329
unsigned int i_active_side;
330330

331-
int i_cq_vector;
331+
int i_scq_vector;
332+
int i_rcq_vector;
332333

333334
unsigned int i_rx_poll_cq;
334335
struct rds_ib_rx_work i_rx_w;

net/rds/ib_cm.c

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -814,13 +814,6 @@ static inline int ibdev_get_unused_vector(struct rds_ib_device *rds_ibdev)
814814
return index;
815815
}
816816

817-
static inline void ibdev_get_vector(struct rds_ib_device *rds_ibdev, int index)
818-
{
819-
mutex_lock(&rds_ibdev->vector_load_lock);
820-
rds_ibdev->vector_load[index]++;
821-
mutex_unlock(&rds_ibdev->vector_load_lock);
822-
}
823-
824817
static inline void ibdev_put_vector(struct rds_ib_device *rds_ibdev, int index)
825818
{
826819
mutex_lock(&rds_ibdev->vector_load_lock);
@@ -840,11 +833,8 @@ static void rds_ib_check_cq(struct ib_device *dev, struct rds_ib_device *rds_ibd
840833
struct ib_cq_init_attr cq_attr = {};
841834

842835
cq_attr.cqe = n;
843-
if (*vector < 0)
844-
*vector = ibdev_get_unused_vector(rds_ibdev);
845-
else
846-
ibdev_get_vector(rds_ibdev, *vector);
847-
cq_attr.comp_vector = *vector;
836+
cq_attr.comp_vector = ibdev_get_unused_vector(rds_ibdev);
837+
*vector = cq_attr.comp_vector;
848838
if (!cq_attr.comp_vector)
849839
cq_attr.comp_vector = IB_CQ_FORCE_ZERO_CV;
850840
*cqp = ib_create_cq(dev, comp_handler, event_handler, ctx, &cq_attr);
@@ -876,14 +866,14 @@ static void __rds_rdma_free_cq(struct rds_ib_connection *ic,
876866
rcq = ic->i_rcq;
877867
ic->i_rcq = NULL;
878868
if (rcq) {
879-
ibdev_put_vector(rds_ibdev, ic->i_cq_vector);
869+
ibdev_put_vector(rds_ibdev, ic->i_rcq_vector);
880870
ib_destroy_cq(rcq);
881871
}
882872

883873
scq = ic->i_scq;
884874
ic->i_scq = NULL;
885875
if (scq) {
886-
ibdev_put_vector(rds_ibdev, ic->i_cq_vector);
876+
ibdev_put_vector(rds_ibdev, ic->i_scq_vector);
887877
ib_destroy_cq(scq);
888878
}
889879
}
@@ -1182,7 +1172,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
11821172
WARN_ON(ic->i_scq);
11831173
}
11841174

1185-
rds_ib_check_cq(dev, rds_ibdev, &ic->i_cq_vector, &ic->i_scq,
1175+
rds_ib_check_cq(dev, rds_ibdev, &ic->i_scq_vector, &ic->i_scq,
11861176
rds_ib_cq_comp_handler_send,
11871177
rds_ib_cq_event_handler, conn,
11881178
ic->i_send_ring.w_nr + 1 + mr_reg,
@@ -1194,7 +1184,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
11941184
goto out;
11951185
}
11961186

1197-
rds_ib_check_cq(dev, rds_ibdev, &ic->i_cq_vector, &ic->i_rcq,
1187+
rds_ib_check_cq(dev, rds_ibdev, &ic->i_rcq_vector, &ic->i_rcq,
11981188
rds_ib_cq_comp_handler_recv,
11991189
rds_ib_cq_event_handler, conn,
12001190
rds_ib_srq_enabled ? rds_ib_srq_max_wr - 1 : ic->i_recv_ring.w_nr,
@@ -2304,7 +2294,6 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
23042294
list_add_tail(&ic->ib_node, &ib_nodev_conns);
23052295
spin_unlock_irqrestore(&ib_nodev_conns_lock, flags);
23062296

2307-
ic->i_cq_vector = -1;
23082297
ic->i_irq_local_cpu = NR_CPUS;
23092298

23102299
INIT_DELAYED_WORK(&ic->i_cm_watchdog_w, rds_ib_cm_watchdog_handler);

0 commit comments

Comments
 (0)