Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/20200702082933.424537-3-leon@kernel.org
Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

authored by

Mark Zhang and committed by
Jason Gunthorpe
c9f55742 7c97f3ad

+1 -1
+1 -1
drivers/infiniband/core/counters.c
··· 276 276 struct rdma_counter *counter; 277 277 int ret; 278 278 279 - if (!qp->res.valid) 279 + if (!qp->res.valid || rdma_is_kernel_res(&qp->res)) 280 280 return 0; 281 281 282 282 if (!rdma_is_port_valid(dev, port))