]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/nldev: Skip counter if port doesn't match
authorMark Zhang <markz@mellanox.com>
Sun, 20 Oct 2019 06:28:00 +0000 (09:28 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 24 Oct 2019 18:31:23 +0000 (15:31 -0300)
commit6e7e9208237f5c85adc5071f534ac0b6961fcd18
tree082f1c32c308ee7365e49270fdfe150f19d9c674
parentc04c849cff8783f54109477ff1d7339530bc5cbb
RDMA/nldev: Skip counter if port doesn't match

The counter resource should return -EAGAIN if it was requested for a
different port, this is similar to how QP works if the users provides a
port filter.

Otherwise port filtering in netlink will return broken counter nests.

Fixes: f41bb7eb11d4 ("RDMA/netlink: Implement counter dumpit calback")
Link: https://lore.kernel.org/r/20191020062800.8065-1-leon@kernel.org
Signed-off-by: Mark Zhang <markz@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/nldev.c