ice: Add stats for Rx drops at the port level
authorBrett Creeley <brett.creeley@intel.com>
Wed, 26 Jun 2019 09:20:22 +0000 (02:20 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 31 Jul 2019 20:40:46 +0000 (13:40 -0700)
commit56923ab66467c2edbd1ff97240ff14805e0b1cdc
tree8a9ca22dd774817354de812ce1d887f93c16f937
parent66b29e7a884e53e7e32ffb893d9897b299cd5cdf
ice: Add stats for Rx drops at the port level

Currently we are not reporting dropped counts at the port level to
ethtool or netlink. This was found when debugging Rx dropped issues
and the total packets sent did not equal the total packets received
minus the rx_dropped, which was very confusing. To determine dropped
counts at the port level we need to read the PRTRPB_RDPC register.
To fix reporting we will store the dropped counts in the PF's
rx_discards. This will be reported to netlink by storing it in the
PF VSI's rx_missed_errors signaling that the receiver missed the
packet. Also, we will report this to ethtool in the rx_dropped.nic
field.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_hw_autogen.h
drivers/net/ethernet/intel/ice/ice_main.c