[RFC PATCH net-next 1/6] net/smc: Spread CQs to differents completion vectors

Tony Lu
2022-01-14T05:49:00Z

This spreads recv/send CQs to different vectors. This removes the
limitation of single vector, which binds to some CPU.

Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
---
net/smc/smc_ib.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/net/smc/smc_ib.c b/net/smc/smc_ib.c
index a3e2d3b89568..d1f337522bd5 100644
--- a/net/smc/smc_ib.c
+++ b/net/smc/smc_ib.c
@@ -823,6 +823,9 @@ long smc_ib_setup_per_ibdev(struct smc_ib_device *smcibdev)
smcibdev->roce_cq_send = NULL;
goto out;
}
+ /* spread to different completion vector */
+ if (smcibdev->ibdev->num_comp_vectors > 1)
+ cqattr.comp_vector = 1;
smcibdev->roce_cq_recv = ib_create_cq(smcibdev->ibdev,
smc_wr_rx_cq_handler, NULL,
smcibdev, &cqattr);
--
2.32.0.3.g01195cf9f