DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 409] testpmd sometimes does not correctly show RX-missed on Mellanox NICs
Date: Tue, 25 Feb 2020 20:15:54 +0000	[thread overview]
Message-ID: <bug-409-3@http.bugs.dpdk.org/> (raw)

https://bugs.dpdk.org/show_bug.cgi?id=409

            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@dpdk.org
          Reporter: cfb@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.

                 reply	other threads:[~2020-02-25 20:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-409-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).