RDMA/nldev: Skip counter if port doesn't match
PATCH 1/1 RDMA/nldev: Skip counter if port doesn't match
From: Mark Zhang <[email protected]>
Counter resource should return -EAGAIN if it was requested for other part. Such situation can occur in multi-port systems.
Fixes c4ffee7c9bdb ("RDMA/netlink: Implement counter dumpit calback")
Signed-off-by Mark Zhang <[email protected]>
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/core/nldev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/nldev.c +1 -1
@@ -832,7 +832,7 @@ static int fill_res_counter_entry(struct sk_buff *msg, bool has_cap_net_admin, container_of(res, struct rdma_counter, res);if (port && port != counter->port) -return 0 ; +return -EAGAIN ;/* Dump it even query failed */ rdma_counter_query_stats (counter);
Signature · 1 line
2.20.1
Jason Gunthorpe
AppliedQuoted 11 lines · Leon Romanovsky
From: Mark Zhang <[email protected]>
Counter resource should return
-EAGAINif it was requested for other part. Such situation can occur in multi-port systems.Fixes c4ffee7c9bdb ("RDMA/netlink: Implement counter dumpit calback")Signed-off-by Mark Zhang <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/core/nldev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-rc, thanks
Jason