net/ice/base: support reading REPC statistics
The GLV_REPC register contains statistics for tracking received packets
that are discarded due to certain errors.
This register behaves differently from some of the other related
statistics registers in two ways. First, it contains two 16bit
statistics, and thus cannot be read as a 32bit or 40bit statistic.
Second, the two stats do not roll over, but instead cap at 0xFFFF.
Add a new ice_stat_update_repc function which will read the register and
increment the appropriate statistics in the ice_eth_stats structure.
Since the register does not roll over, make use of the "Write Clear"
behavior, and write to the register to reset it every time we read it.
Add extra space for the two statistics that are counted by this
register, rx_errors, and rx_no_desc.
For now, wrap the new function and stats counters in !LINUX_SUPPORT.
This can later be removed if and when the Linux driver implements
support for reading the statistics.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>