1. 17 Jun, 2024 2 commits
    • Joe Damato's avatar
      net/mlx5e: Add per queue netdev-genl stats · 7b66ae53
      Joe Damato authored
      ./cli.py --spec netlink/specs/netdev.yaml \
               --dump qstats-get --json '{"scope": "queue"}'
      
      ...snip
      
       {'ifindex': 7,
        'queue-id': 62,
        'queue-type': 'rx',
        'rx-alloc-fail': 0,
        'rx-bytes': 105965251,
        'rx-packets': 179790},
       {'ifindex': 7,
        'queue-id': 0,
        'queue-type': 'tx',
        'tx-bytes': 9402665,
        'tx-packets': 17551},
      
      ...snip
      
      Also tested with the script tools/testing/selftests/drivers/net/stats.py
      in several scenarios to ensure stats tallying was correct:
      
      - on boot (default queue counts)
      - adjusting queue count up or down (ethtool -L eth0 combined ...)
      
      The tools/testing/selftests/drivers/net/stats.py brings the device up,
      so to test with the device down, I did the following:
      
      $ ip link show eth4
      7: eth4: <BROADCAST,MULTICAST> mtu 9000 qdisc mq state DOWN [..snip..]
        [..snip..]
      
      $ cat /proc/net/dev | grep eth4
      eth4: 235710489  434811 [..snip rx..] 2878744 21227  [..snip tx..]
      
      $ ./cli.py --spec ../../../Documentation/netlink/specs/netdev.yaml \
                 --dump qstats-get --json '{"ifindex": 7}'
      [{'ifindex': 7,
        'rx-alloc-fail': 0,
        'rx-bytes': 235710489,
        'rx-packets': 434811,
        'tx-bytes': 2878744,
        'tx-packets': 21227}]
      
      Compare the values in /proc/net/dev match the output of cli for the same
      device, even while the device is down.
      
      Note that while the device is down, per queue stats output nothing
      (because the device is down there are no queues):
      
      $ ./cli.py --spec ../../../Documentation/netlink/specs/netdev.yaml \
                 --dump qstats-get --json '{"scope": "queue", "ifindex": 7}'
      []
      Signed-off-by: default avatarJoe Damato <jdamato@fastly.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b66ae53
    • Joe Damato's avatar
      net/mlx5e: Add txq to sq stats mapping · 0a3e5c1b
      Joe Damato authored
      mlx5 currently maps txqs to an sq via priv->txq2sq. It is useful to map
      txqs to sq_stats, as well, for direct access to stats.
      
      Add priv->txq2sq_stats and insert mappings. The mappings will be used
      next to tabulate stats information.
      Signed-off-by: default avatarJoe Damato <jdamato@fastly.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a3e5c1b
  2. 15 Jun, 2024 23 commits
  3. 14 Jun, 2024 15 commits