linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-next v1 00/11] Optional counter statistics support
@ 2021-09-14 23:07 Leon Romanovsky
  2021-09-14 23:07 ` [PATCH mlx5-next v1 01/11] net/mlx5: Add ifc bits to support optional counters Leon Romanovsky
                   ` (10 more replies)
  0 siblings, 11 replies; 27+ messages in thread
From: Leon Romanovsky @ 2021-09-14 23:07 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, Aharon Landau, Dennis Dalessandro, Gal Pressman,
	Jakub Kicinski, linux-rdma, Maor Gottlieb, Mark Zhang,
	Mike Marciniszyn, Mustafa Ismail, Naresh Kumar PBS,
	Neta Ostrovsky, netdev, Potnuri Bharat Teja, Saeed Mahameed,
	Selvin Xavier, Shiraz Saleem, Yishai Hadas, Zhu Yanjun

From: Leon Romanovsky <leonro@nvidia.com>

Change Log:
v1:
* Add a descriptor structure to replace name in struct rdma_hw_stats;
* Add a bitmap in struct rdma_hw_stats to indicate the enable/disable
  status of all counters;
* Add a "flag" field in counter descriptor and define
  IB_STAT_FLAG_OPTIONAL flag;
* add/remove_op_stat() are replaced by modify_op_stat();
* Use "set/unset" in command line and send full opcounters list through
  netlink, and send opcounter indexes instead of names;
* Patches are re-ordered.
v0: https://lore.kernel.org/all/20210818112428.209111-1-markzhang@nvidia.com

----------------------------------------------------------------------
Hi,

This series from Neta and Aharon provides an extension to the rdma
statistics tool that allows to set optional counters dynamically, using
netlink.

The idea of having optional counters is to provide to the users the
ability to get statistics of counters that hurts performance.

Once an optional counter was added, its statistics will be presented
along with all the counters, using the show command.

Binding objects to the optional counters is currently not supported,
neither in auto mode nor in manual mode.

To get the list of optional counters that are supported on this device,
use "rdma statistic mode supported". To see which counters are currently
enabled, use "rdma statistic mode".

Examples:

$ rdma statistic mode supported
link rocep8s0f0/1 supported optional-counters cc_rx_ce_pkts,cc_rx_cnp_pkts,cc_tx_cnp_pkts
link rocep8s0f1/1 supported optional-counters cc_rx_ce_pkts,cc_rx_cnp_pkts,cc_tx_cnp_pkts

$ sudo rdma statistic set link rocep8s0f0/1 optional-counters cc_rx_ce_pkts,cc_rx_cnp_pkts
$ rdma statistic mode link rocep8s0f0/1
link rocep8s0f0/1 optional-counters cc_rx_ce_pkts,cc_rx_cnp_pkts

$ rdma statistic show link rocep8s0f0/1
link rocep8s0f0/1 rx_write_requests 0 rx_read_requests 0 rx_atomic_requests 0 out_of_buffer 0
out_of_sequence 0 duplicate_request 0 rnr_nak_retry_err 0 packet_seq_err 0 implied_nak_seq_err 0
local_ack_timeout_err 0 resp_local_length_error 0 resp_cqe_error 0 req_cqe_error 0
req_remote_invalid_request 0 req_remote_access_errors 0 resp_remote_access_errors 0
resp_cqe_flush_error 0 req_cqe_flush_error 0 roce_adp_retrans 0 roce_adp_retrans_to 0
roce_slow_restart 0 roce_slow_restart_cnps 0 roce_slow_restart_trans 0 rp_cnp_ignored 0
rp_cnp_handled 0 np_ecn_marked_roce_packets 0 np_cnp_sent 0 rx_icrc_encapsulated 0 cc_rx_ce_pkts 0
cc_rx_cnp_pkts 0

$ sudo rdma statistic set link rocep8s0f0/1 optional-counters cc_rx_ce_pkts
$ rdma statistic mode link rocep8s0f0/1
link rocep8s0f0/1 optional-counters cc_rx_ce_pkts

Thanks

Aharon Landau (11):
  net/mlx5: Add ifc bits to support optional counters
  net/mlx5: Add priorities for counters in RDMA namespaces
  RDMA/counter: Add a descriptor in struct rdma_hw_stats
  RDMA/counter: Add an is_disabled field in struct rdma_hw_stats
  RDMA/counter: Add optional counter support
  RDMA/nldev: Add support to get status of all counters
  RDMA/nldev: Allow optional-counter status configuration through RDMA
    netlink
  RDMA/mlx5: Support optional counters in hw_stats initialization
  RDMA/mlx5: Add steering support in optional flow counters
  RDMA/mlx5: Add modify_op_stat() support
  RDMA/mlx5: Add optional counter support in get_hw_stats callback

 drivers/infiniband/core/counters.c            |  30 +-
 drivers/infiniband/core/device.c              |   1 +
 drivers/infiniband/core/nldev.c               | 289 +++++++++++++-----
 drivers/infiniband/core/sysfs.c               |  41 ++-
 drivers/infiniband/hw/bnxt_re/hw_counters.c   | 114 +++----
 drivers/infiniband/hw/cxgb4/provider.c        |  22 +-
 drivers/infiniband/hw/efa/efa_verbs.c         |  19 +-
 drivers/infiniband/hw/hfi1/verbs.c            |  43 +--
 drivers/infiniband/hw/irdma/verbs.c           |  98 +++---
 drivers/infiniband/hw/mlx4/main.c             |  37 +--
 drivers/infiniband/hw/mlx4/mlx4_ib.h          |   2 +-
 drivers/infiniband/hw/mlx5/counters.c         | 280 ++++++++++++++---
 drivers/infiniband/hw/mlx5/fs.c               | 187 ++++++++++++
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |  28 +-
 drivers/infiniband/sw/rxe/rxe_hw_counters.c   |  42 +--
 .../net/ethernet/mellanox/mlx5/core/fs_core.c |  54 +++-
 include/linux/mlx5/device.h                   |   2 +
 include/linux/mlx5/fs.h                       |   2 +
 include/linux/mlx5/mlx5_ifc.h                 |  22 +-
 include/rdma/ib_hdrs.h                        |   1 +
 include/rdma/ib_verbs.h                       |  48 ++-
 include/rdma/rdma_counter.h                   |   2 +
 include/uapi/rdma/rdma_netlink.h              |   3 +
 23 files changed, 1041 insertions(+), 326 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2021-09-29 23:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 23:07 [PATCH rdma-next v1 00/11] Optional counter statistics support Leon Romanovsky
2021-09-14 23:07 ` [PATCH mlx5-next v1 01/11] net/mlx5: Add ifc bits to support optional counters Leon Romanovsky
2021-09-14 23:07 ` [PATCH mlx5-next v1 02/11] net/mlx5: Add priorities for counters in RDMA namespaces Leon Romanovsky
2021-09-14 23:07 ` [PATCH rdma-next v1 03/11] RDMA/counter: Add a descriptor in struct rdma_hw_stats Leon Romanovsky
2021-09-14 23:07 ` [PATCH rdma-next v1 04/11] RDMA/counter: Add an is_disabled field " Leon Romanovsky
2021-09-27 16:53   ` Jason Gunthorpe
2021-09-28  3:28     ` Mark Zhang
2021-09-28 11:51       ` Jason Gunthorpe
2021-09-14 23:07 ` [PATCH rdma-next v1 05/11] RDMA/counter: Add optional counter support Leon Romanovsky
2021-09-27 17:03   ` Jason Gunthorpe
2021-09-28  9:03     ` Mark Zhang
2021-09-28 11:51       ` Jason Gunthorpe
2021-09-29 12:14         ` Leon Romanovsky
2021-09-14 23:07 ` [PATCH rdma-next v1 06/11] RDMA/nldev: Add support to get status of all counters Leon Romanovsky
2021-09-27 17:30   ` Jason Gunthorpe
2021-09-28  9:12     ` Mark Zhang
2021-09-28 11:52       ` Jason Gunthorpe
2021-09-28 12:51         ` Mark Zhang
2021-09-29 12:26         ` Leon Romanovsky
2021-09-29 23:56           ` Jason Gunthorpe
2021-09-14 23:07 ` [PATCH rdma-next v1 07/11] RDMA/nldev: Allow optional-counter status configuration through RDMA netlink Leon Romanovsky
2021-09-27 17:20   ` Jason Gunthorpe
2021-09-29 12:27     ` Leon Romanovsky
2021-09-14 23:07 ` [PATCH rdma-next v1 08/11] RDMA/mlx5: Support optional counters in hw_stats initialization Leon Romanovsky
2021-09-14 23:07 ` [PATCH rdma-next v1 09/11] RDMA/mlx5: Add steering support in optional flow counters Leon Romanovsky
2021-09-14 23:07 ` [PATCH rdma-next v1 10/11] RDMA/mlx5: Add modify_op_stat() support Leon Romanovsky
2021-09-14 23:07 ` [PATCH rdma-next v1 11/11] RDMA/mlx5: Add optional counter support in get_hw_stats callback Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).