]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/counter: Prevent QP counter binding if counters unsupported
authorMark Zhang <markz@mellanox.com>
Wed, 7 Aug 2019 10:18:19 +0000 (13:18 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 7 Aug 2019 20:09:23 +0000 (16:09 -0400)
commite8720a2711a24d15a3a6b38cd106ca48bf1a00e9
tree72ab0466600d3e6b076b9e2366f55f903dbf8f62
parent1421e05bf07b7152d554404be51c67c30b407cf6
RDMA/counter: Prevent QP counter binding if counters unsupported

In case of rdma_counter_init() fails, counter allocation and QP bind
should not be allowed.

Fixes: 3571e8462e47 ("RDMA/counter: Add set/clear per-port auto mode support")
Fixes: f88393b526bb ("RDMA/counter: Allow manual mode configuration support")
Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Link: https://lore.kernel.org/r/20190807101819.7581-1-leon@kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/counters.c