]> git.ipfire.org Git - thirdparty/iproute2.git/commit
rdma: Add stat "mode" support
authorNeta Ostrovsky <netao@nvidia.com>
Thu, 14 Oct 2021 07:53:57 +0000 (10:53 +0300)
committerDavid Ahern <dsahern@kernel.org>
Fri, 15 Oct 2021 23:52:53 +0000 (17:52 -0600)
commit7d5cb70e947d2f720bed51bab4e82fa517f94093
tree8d2724899846723ae4b644835364da60ecd1e00b
parentd480cb71f57fc2139c2c90412b70faa965506c70
rdma: Add stat "mode" support

This patch introduces the "mode" command, which presents the enabled or
supported (when the "supported" argument is available) optional
counters.

An optional counter is a vendor-specific counter that may be
dynamically enabled/disabled. This enhancement of hwcounters allows
exposing of counters which are for example mutual exclusive and cannot
be enabled at the same time, counters that might degrades performance,
optional debug counters, etc.

Examples:
To present currently enabled optional counters on link rocep8s0f0/1:
    $ rdma statistic mode link rocep8s0f0/1
    link rocep8s0f0/1 optional-counters cc_rx_ce_pkts

To present supported optional counters on link rocep8s0f0/1:
    $ rdma statistic mode supported link rocep8s0f0/1
    link rocep8s0f0/1 supported optional-counters cc_rx_ce_pkts,cc_rx_cnp_pkts,cc_tx_cnp_pkts

Signed-off-by: Neta Ostrovsky <netao@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
man/man8/rdma-statistic.8
rdma/stat.c