diff mbox series

[net] ice: ignore dropped packets during init

Message ID 20211023002817.86671-1-jesse.brandeburg@intel.com
State Accepted
Delegated to: Anthony Nguyen
Headers show
Series [net] ice: ignore dropped packets during init | expand

Commit Message

Jesse Brandeburg Oct. 23, 2021, 12:28 a.m. UTC
If the hardware is constantly receiving unicast or broadcast packets
during driver load, the device previously counted many GLV_RDPC (VSI
dropped packets) events during init. This causes confusing dropped
packet statistics during driver load. The dropped packets counter
incrementing does stop once the driver finishes loading.

Avoid this problem by baselining our statistics at the end of driver
open instead of the end of probe.

Fixes: cdedef59deb0 ("ice: Configure VSIs for Tx/Rx")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
Testing Hints: pktgen or ping flood the DUT, while reloading the driver
and bringing up the interface (in a script or with networkmanager) and
note dropped packets with ip -s -s link or ifconfig, after this patch
there should be none.
---
 drivers/net/ethernet/intel/ice/ice_main.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

G, GurucharanX Nov. 2, 2021, 8:16 a.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Jesse
> Brandeburg
> Sent: Saturday, October 23, 2021 5:58 AM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net] ice: ignore dropped packets during init
> 
> If the hardware is constantly receiving unicast or broadcast packets during
> driver load, the device previously counted many GLV_RDPC (VSI dropped
> packets) events during init. This causes confusing dropped packet statistics
> during driver load. The dropped packets counter incrementing does stop once
> the driver finishes loading.
> 
> Avoid this problem by baselining our statistics at the end of driver open instead
> of the end of probe.
> 
> Fixes: cdedef59deb0 ("ice: Configure VSIs for Tx/Rx")
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
> Testing Hints: pktgen or ping flood the DUT, while reloading the driver and
> bringing up the interface (in a script or with networkmanager) and note
> dropped packets with ip -s -s link or ifconfig, after this patch there should be
> none.
> ---
>  drivers/net/ethernet/intel/ice/ice_main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 06fa93e597fb..4372aea1eb1b 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5608,6 +5608,9 @@  static int ice_up_complete(struct ice_vsi *vsi)
 		netif_carrier_on(vsi->netdev);
 	}
 
+	/* clear this now, and the first stats read will be used as baseline */
+	vsi->stat_offsets_loaded = false;
+
 	ice_service_task_schedule(pf);
 
 	return 0;