Skip to content

Commit 12fb115

Browse files
chiarameiohasrleon
authored andcommitted
RDMA/nldev: Expose whether RDMA monitoring is supported
Extend the "rdma sys" command to display whether RDMA monitoring is supported. RDMA monitoring is not supported in mlx4 because it does not use the ib_device_set_netdev() API, which sends the RDMA events. Example output for kernel where monitoring is supported: $ rdma sys show netns shared privileged-qkey off monitor on copy-on-fork on Example output for kernel where monitoring is not supported: $ rdma sys show netns shared privileged-qkey off monitor off copy-on-fork on Signed-off-by: Chiara Meiohas <[email protected]> Signed-off-by: Michael Guralnik <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 9cbed5a commit 12fb115

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/infiniband/core/nldev.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,12 @@ static int nldev_sys_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
19521952
nlmsg_free(msg);
19531953
return err;
19541954
}
1955+
1956+
err = nla_put_u8(msg, RDMA_NLDEV_SYS_ATTR_MONITOR_MODE, 1);
1957+
if (err) {
1958+
nlmsg_free(msg);
1959+
return err;
1960+
}
19551961
/*
19561962
* Copy-on-fork is supported.
19571963
* See commits:

include/uapi/rdma/rdma_netlink.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ enum rdma_nldev_attr {
579579

580580
RDMA_NLDEV_ATTR_EVENT_TYPE, /* u8 */
581581

582+
RDMA_NLDEV_SYS_ATTR_MONITOR_MODE, /* u8 */
582583
/*
583584
* Always the end
584585
*/

0 commit comments

Comments
 (0)