Project

General

Profile

Bug #12011

ixgbe reports incorrect MAC_STAT_NORCVBUF

Added by Ryan Zezeski 14 days ago. Updated about 20 hours ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

The MAC_STAT_NORCVBUF will always report zero on all controllers other than 82598. The RNBC register it relies on was removed starting with 82599. From then on you query the queue dropped packet via the QPRDC[n] registers. Our current driver (incoherently) maps the RQMSR[n].Q_MAP[m] registers that the QPDRC[n] registers rely on, but it never reads the later. We should map the RQMSR reg in a way that makes more sense and use the QPDRC reg to fill in MAC_STAT_NORCVBUF for non-82598 controllers.

History

#1

Updated by Ryan Zezeski 14 days ago

  • Status changed from New to In Progress
#2

Updated by Ryan Zezeski about 20 hours ago

While working on some feedback from Robert I noticed a few additional issues. I'm going to lump them in with this ticket unless someone objects.

First, I'm removing the various queue statistic arrays for both Rx and Tx. E.g., instead of having 16 qbrc stats (Queue Bytes Received Counter) we will now have one qor (Queue Octets Received). While doing this work I found a few supplemental issues.

  • The comment about the GORC/GOTC regs being unreliable is now over 12 years old. Let's assume Intel fixed the glitch and use the correct registers (instead of using the tor/tot values, which are also wrong).
  • The gprc/gptc (Good Packets) values were being filled by the qprc/qptc values -- this is just wrong. There are separate good packet regs provided by the controller, use them.
  • The tor (Total Octets Received) was being filled by the qbrc -- also wrong. The controller provides the IXGBE_TOR{H,L} regs for this.
  • The tot (Total Octets Transmitted) is a nonexistent stat on the controller but we use it to populate MAC_STAT_OBYTES. We fill it from the queue regs, but a better solution is to fill it from the got value. It makes sense that the only octets transmitted are the good octets (though it makes you wonder why they have a TPT reg).

Also available in: Atom PDF