mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
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 <markz@mellanox.com> Reviewed-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
b389327df9
commit
83c2c1fcbd
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user