]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mlx4_ib: Distribute completion vectors when zero is supplied
authorHåkon Bugge <haakon.bugge@oracle.com>
Wed, 6 Feb 2019 18:28:52 +0000 (19:28 +0100)
committerBrian Maly <brian.maly@oracle.com>
Wed, 27 Feb 2019 19:46:58 +0000 (14:46 -0500)
MAD packet sending/receiving is not properly virtualized in
CX-3. Hence, these are proxied through the PF driver. The proxying
uses UD QPs. The associated CQs are created with completion vector
zero, in anticipation that zero will return the least-used vector, as
per commit 6ba1eb776461 ("IB/mlx4: Scatter CQs to different EQs").

However, this does not happen, and we see that only the first EQ is
used for these proxy QPs.

This leads to great imbalance in CPU processing, in particular during
fail-over and fail-back, when a large number of RDMA CM
requests/responses are proxied through the PF driver.

Orabug: 29318191

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Sudhakar Dindukurti <sudhakar.dindukurti@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/infiniband/hw/mlx4/cq.c

index 6fc62c190d658d3563fe71261997ee87d7dfd1d7..6e00bec738e4d324dbf40ffe7d36b210048f138d 100644 (file)
@@ -234,6 +234,8 @@ struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev, int entries, int vector
        if (dev->eq_table) {
                vector = dev->eq_table[mlx4_choose_vector(dev->dev, vector,
                                                          ibdev->num_comp_vectors)];
+       } else {
+               vector = mlx4_choose_vector(dev->dev, vector, ibdev->num_comp_vectors);
        }
 
        cq->vector = vector;