[dpdk-dev] [Bug 409] testpmd sometimes does not correctly show RX-missed on Mellanox NICs

bugzilla at dpdk.org bugzilla at dpdk.org
Tue Feb 25 21:15:54 CET 2020


            Bug ID: 409
           Summary: testpmd sometimes does not correctly show RX-missed on
                    Mellanox NICs
           Product: DPDK
           Version: 19.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: testpmd
          Assignee: dev at dpdk.org
          Reporter: cfb at hpe.com
  Target Milestone: ---

When running testpmd using the Mellanox driver (mlx5), the value shown for
RX-missed will overflow and show an extremely large value at times. This
appears to occur when
/sys/devices/.../inifiband/mlx5_*/ports/*/hw_counters/out_of_buffer rolls over.
This value is an unsigned 32 bit and testpmd uses an unsigned 64 bit to store
the value. The initial value is read when testpmd is started, then a new value
is read while it is running. If the value read is less than the initial read
(after a rollover occurs), the difference will result in a negative value (or
in the case of unsigned storage, an extremely large value).

The calculation occurs in mlx5_stats_get():

        mlx5_read_ib_stat(priv, "out_of_buffer", &tmp.imissed);
        tmp.imissed -= priv->stats_ctrl.imissed_base;

Where the stored value, priv->stats_ctrl.imissed_base, contains a larger value
than the value stored in tmp.imissed.

Two possible solutions are to change the Mellanox drivers to use an unsigned 64
bit value for out_of_buffer in sysfs (so that it doesn't rollover), or to
modify the mlx5 code to account for the rollover.

You are receiving this mail because:
You are the assignee for the bug.

More information about the dev mailing list