diff options
author | Guvenc Gulce <guvenc@linux.ibm.com> | 2021-06-16 16:52:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-16 12:54:02 -0700 |
commit | 8c40602b4be17571dfd75102f4f1e690311c5210 (patch) | |
tree | 0cb1428c4b06f860a855e80c6d28f3de1f2f1fe2 /net/smc/smc_netlink.c | |
parent | e0e4b8fa533858532f1b9ea9c6a4660d09beb37a (diff) |
net/smc: Add netlink support for SMC statistics
Add the netlink function which collects the statistics information and
delivers it to the userspace.
Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_netlink.c')
-rw-r--r-- | net/smc/smc_netlink.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/smc/smc_netlink.c b/net/smc/smc_netlink.c index 140419a19dbf..30e30b23370f 100644 --- a/net/smc/smc_netlink.c +++ b/net/smc/smc_netlink.c @@ -19,6 +19,7 @@ #include "smc_core.h" #include "smc_ism.h" #include "smc_ib.h" +#include "smc_stats.h" #include "smc_netlink.h" #define SMC_CMD_MAX_ATTR 1 @@ -55,6 +56,11 @@ static const struct genl_ops smc_gen_nl_ops[] = { /* can be retrieved by unprivileged users */ .dumpit = smcr_nl_get_device, }, + { + .cmd = SMC_NETLINK_GET_STATS, + /* can be retrieved by unprivileged users */ + .dumpit = smc_nl_get_stats, + }, }; static const struct nla_policy smc_gen_nl_policy[2] = { |