]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/counter: Add PID category support in auto mode
authorMark Zhang <markz@mellanox.com>
Thu, 2 Jul 2020 08:29:31 +0000 (11:29 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 10 Jul 2020 19:50:53 +0000 (16:50 -0300)
commit5a361cdd22c145710454dce3cbb6bc40181d28af
treee1df799573e17e3b04158f55d0ae1b80990a2285
parentae8ecec18b6e3bf0000fe129c13afb4ceea2a56e
RDMA/counter: Add PID category support in auto mode

With the "PID" category QPs have same PID will be bound to same counter;
If this category is not set then QPs have different PIDs will be bound
to same counter.

This is implemented for 2 reasons:
1. The counter is a limited resource, while there may be dozens of
   applications, each of which creates several types of QPs, which means
   it may doesn't have enough counter.
2. The system administrator needs all QPs created by all applications
   with same type bound to one counter.

The counter name and PID is only make sense when "PID" category are
configured.

This category can also be used in combine with others, e.g. QP type.

Link: https://lore.kernel.org/r/20200702082933.424537-2-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>
drivers/infiniband/core/counters.c
drivers/infiniband/core/nldev.c
include/uapi/rdma/rdma_netlink.h