diff options
| author | Mark Zhang <[email protected]> | 2020-07-02 08:29:32 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2020-07-10 19:50:53 +0000 |
| commit | c9f557421e505f75da4234a6af8eff46bc08614b (patch) | |
| tree | 49482b011f21cd3a0335f48eec3367b9d883642b /drivers/infiniband/core/counters.c | |
| parent | RDMA/counter: Add PID category support in auto mode (diff) | |
| download | kernel-c9f557421e505f75da4234a6af8eff46bc08614b.tar.gz kernel-c9f557421e505f75da4234a6af8eff46bc08614b.zip | |
RDMA/counter: Only bind user QPs in auto mode
In auto mode only bind user QPs to a dynamic counter, since this feature
is mainly used for system statistic and diagnostic purpose, while there's
no need to counter kernel QPs so far.
Fixes: 99fa331dc862 ("RDMA/counter: Add "auto" configuration mode support")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Zhang <[email protected]>
Reviewed-by: Maor Gottlieb <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/core/counters.c')
| -rw-r--r-- | drivers/infiniband/core/counters.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/counters.c b/drivers/infiniband/core/counters.c index 40204c6caa5b..c88139fa859e 100644 --- a/drivers/infiniband/core/counters.c +++ b/drivers/infiniband/core/counters.c @@ -276,7 +276,7 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port) struct rdma_counter *counter; int ret; - if (!qp->res.valid) + if (!qp->res.valid || rdma_is_kernel_res(&qp->res)) return 0; if (!rdma_is_port_valid(dev, port)) |
