diff options
| author | Mark Zhang <[email protected]> | 2019-07-02 10:02:45 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2019-07-05 13:22:55 +0000 |
| commit | 83c2c1fcbd08ec3eb69a7f381c4e453d1a45ade3 (patch) | |
| tree | 08bdc708aef1cb9578e4d2fbebd4b72491206fc4 /drivers/infiniband/core/counters.c | |
| parent | RDMA/nldev: Allow counter manual mode configration through RDMA netlink (diff) | |
| download | kernel-83c2c1fcbd08ec3eb69a7f381c4e453d1a45ade3.tar.gz kernel-83c2c1fcbd08ec3eb69a7f381c4e453d1a45ade3.zip | |
RDMA/nldev: Allow get counter mode through RDMA netlink
Provide an option to get current counter mode through RDMA netlink.
Signed-off-by: Mark Zhang <[email protected]>
Reviewed-by: Majd Dibbiny <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/core/counters.c')
| -rw-r--r-- | drivers/infiniband/core/counters.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/infiniband/core/counters.c b/drivers/infiniband/core/counters.c index 0ebe36e9fa7b..01faef7bc061 100644 --- a/drivers/infiniband/core/counters.c +++ b/drivers/infiniband/core/counters.c @@ -576,6 +576,19 @@ out: return ret; } +int rdma_counter_get_mode(struct ib_device *dev, u8 port, + enum rdma_nl_counter_mode *mode, + enum rdma_nl_counter_mask *mask) +{ + struct rdma_port_counter *port_counter; + + port_counter = &dev->port_data[port].port_counter; + *mode = port_counter->mode.mode; + *mask = port_counter->mode.mask; + + return 0; +} + void rdma_counter_init(struct ib_device *dev) { struct rdma_port_counter *port_counter; |
