Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 640FEC433F5 for ; Mon, 13 Dec 2021 09:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237436AbhLMJzr (ORCPT ); Mon, 13 Dec 2021 04:55:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237076AbhLMJvi (ORCPT ); Mon, 13 Dec 2021 04:51:38 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54494C08ECA4; Mon, 13 Dec 2021 01:44:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F3734B80E2E; Mon, 13 Dec 2021 09:44:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47E20C00446; Mon, 13 Dec 2021 09:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1639388655; bh=HuQBqFMQSc6M+LcN2eaG/2/EtqrMxfiHbDgFegvEng0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EhoDQDPq8QuN6qhUFLBSVF9L3Hld5GE2YMFjfKiLZSi8qZfdC4O56SgciXRBub3/k uPT+HGPQq4Eo4bnuYgiCM4F7oIwtamtHkWhppDv44hU6C2zpdZCWsoyIvj4nlPKVMT 7UEpzaHTn2y4ArzTjcp5MAwr90GbPCNtjyZGDW/g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jesse Brandeburg , Gurucharan G , Tony Nguyen Subject: [PATCH 5.4 19/88] ice: ignore dropped packets during init Date: Mon, 13 Dec 2021 10:29:49 +0100 Message-Id: <20211213092933.880514740@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213092933.250314515@linuxfoundation.org> References: <20211213092933.250314515@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jesse Brandeburg commit 28dc1b86f8ea9fd6f4c9e0b363db73ecabf84e22 upstream. 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 Tested-by: Gurucharan G Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ice/ice_main.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3561,6 +3561,9 @@ static int ice_up_complete(struct ice_vs 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;