OSDN Git Service

RDMA/nldev: Allow different fill function per resource
authorErez Alfasi <ereza@mellanox.com>
Wed, 16 Oct 2019 06:23:06 +0000 (09:23 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 22 Oct 2019 18:22:47 +0000 (15:22 -0300)
commitfb91069088faf30c6e8aeeed900326c040623e2d
treef9a41a9f6f6a162e343f409aa58018b58d4020ad
parenta3de94e3d61ec6e6c57ee066ec4d28ebc260dafa
RDMA/nldev: Allow different fill function per resource

So far res_get_common_{dumpit, doit} was using the default resource fill
function which was defined as part of the nldev_fill_res_entry
fill_entries.

Add a fill function pointer as an argument allows us to use different fill
function in case we want to dump different values then 'rdma resource'
flow do, but still use the same existing general resources dumping flow.

Link: https://lore.kernel.org/r/20191016062308.11886-3-leon@kernel.org
Signed-off-by: Erez Alfasi <ereza@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