RDMA/nldev: Added configuration of RDMA dynamic interrupt moderation to netlink
authorYamin Friedman <yaminf@mellanox.com>
Mon, 8 Jul 2019 10:59:04 +0000 (13:59 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 8 Jul 2019 19:37:22 +0000 (16:37 -0300)
commitf8fc8cd9c612c31f92b19b72f619fa043ec76e5e
treec622da5ace9dda0f1ac72467888d9b2f759cfbaa
parentda6629793aa6944db6c8a908ca1a52d87f1489aa
RDMA/nldev: Added configuration of RDMA dynamic interrupt moderation to netlink

Added parameter in ib_device for enabling dynamic interrupt moderation so
that it can be configured in userspace using rdma tool.

In order to set adaptive-moderation for an ib device the command is:
rdma dev set [DEV] adaptive-moderation [on|off]
Please set on/off.

rdma dev show
0: mlx5_0: node_type ca fw 16.26.0055 node_guid 248a:0703:00a5:29d0
sys_image_guid 248a:0703:00a5:29d0 adaptive-moderation on

rdma resource show cq
dev mlx5_0 cqn 0 cqe 1023 users 4 poll-ctx UNBOUND_WORKQUEUE
adaptive-moderation off comm [ib_core]

Signed-off-by: Yamin Friedman <yaminf@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/Kconfig
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/device.c
drivers/infiniband/core/nldev.c
include/uapi/rdma/rdma_netlink.h