net/mlx5: provide send scheduling error statistics
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Thu, 16 Jul 2020 08:23:18 +0000 (08:23 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 13:44:36 +0000 (15:44 +0200)
commit3b025c0ca425a634b7eead08420fa5a5cfaa1445
tree0f272ba6c34bc223908e43a5bc68b00a7cf9066e
parentb94d93ca7380328d07547addfe93a5c83e48a889
net/mlx5: provide send scheduling error statistics

The mlx5 PMD exposes the following new introduced
extended statistics counter to report the errors
of packet send scheduling on timestamps:

  - txpp_err_miss_int - rearm queue interrupt was not handled
    was not handled in time and service routine might miss
    the completions

  - txpp_err_rearm_queue - reports errors in rearm queue
  - txpp_err_clock_queue - reports errors in clock queue

  - txpp_err_ts_past - timestamps in the packet being sent
    were found in the past, timestamps were ignored

  - txpp_err_ts_future - timestamps in the packet being sent
    were found in the too distant future (beyond HW/clock queue
    capabilities to schedule, typically it is about 16M of
    tx_pp devarg periods)

  - txpp_jitter - estimated jitter in device clocks between
    8K completions of Clock Queue.

  - txpp_wander - estimated wander in device clocks between
    16M completions of Clock Queue.

  - txpp_sync_lost - error flag, the Clock Queue completions
    synchronization is lost, accurate packet scheduling can
    not be handled, timestamps are being ignored, the restart
    of all ports using scheduling must be performed.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_stats.c
drivers/net/mlx5/mlx5_txpp.c