Counters per VF?

Hello,

I just found that one can read the counters per port per interface at the following locations:

/sys/class/infiniband/mlx4_X/ports//counters/

/sys/class/infiniband/mlx4_X/ports//counters_ext/

Is there any way to get counters for specific virtual functions when using SRIOV

Vangelis

Hi Ophir,

Is there a solution for this? Im also getting the same error with respect to IB VFs within a VM.

Thanks!

Adit

Hi Adit,

A fix for this issue was intoroduced in mlnx ofed 3.1-1.0.0 and it is also available in upstream kernel since 4.3.

Eran.

Let me check that for you.

Ophir.

Hi Vangelis,

You can view the VF counters via the ethtool when connected to the VM.

Refer to this post as well.

Counters Troubleshooting for Linux Driver https://community.mellanox.com/s/article/counters-troubleshooting-for-linux-driver

Thanks,

Ophir.

Is it possible to view the VF counters for IB? Looks like it is not possible to get this information currently.

In the following example mlx4_0 is the PF and mlx4_1 and mlx4_2 are two probed VFs.

cat /sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_data

16199496

cat /sys/class/infiniband/mlx4_1/ports/1/counters/port_xmit_data

cat: /sys/class/infiniband/mlx4_1/ports/1/counters/port_xmit_data: Invalid argument

cat /sys/class/infiniband/mlx4_2/ports/1/counters/port_xmit_data

cat: /sys/class/infiniband/mlx4_2/ports/1/counters/port_xmit_data: Invalid argument