From patchwork Sat Feb 7 09:22:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 22491 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 562F0DDDF0 for ; Sat, 7 Feb 2009 20:23:13 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753203AbZBGJWz (ORCPT ); Sat, 7 Feb 2009 04:22:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752317AbZBGJWx (ORCPT ); Sat, 7 Feb 2009 04:22:53 -0500 Received: from qmta01.westchester.pa.mail.comcast.net ([76.96.62.16]:51139 "EHLO QMTA01.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbZBGJWw (ORCPT ); Sat, 7 Feb 2009 04:22:52 -0500 Received: from OMTA09.westchester.pa.mail.comcast.net ([76.96.62.20]) by QMTA01.westchester.pa.mail.comcast.net with comcast id CxE71b0010SCNGk51xNJsz; Sat, 07 Feb 2009 09:22:18 +0000 Received: from lost.foo-projects.org ([63.64.152.142]) by OMTA09.westchester.pa.mail.comcast.net with comcast id CxNZ1b00934bfcX3VxNbn8; Sat, 07 Feb 2009 09:22:50 +0000 From: Jeff Kirsher Subject: [net-next PATCH 23/26] igb: update stats before doing reset in igb_down To: davem@davemloft.net Cc: netdev@vger.kernel.org, jeff@garzik.org, gospo@redhat.com, Alexander Duyck , Jeff Kirsher Date: Sat, 07 Feb 2009 01:22:32 -0800 Message-ID: <20090207092232.15697.12038.stgit@lost.foo-projects.org> In-Reply-To: <20090207091504.15697.26667.stgit@lost.foo-projects.org> References: <20090207091504.15697.26667.stgit@lost.foo-projects.org> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alexander Duyck It was seen with repeated interface up/down testing that there was a large stray between the stats reported by the queues and the stats reported by the HW. It was found to be an issue in that hw stats were being reset without first being recorded. This change records the stats before wiping them from the system via the reset. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher --- drivers/net/igb/igb_main.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 3b79ad8..88f135f 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -858,6 +858,10 @@ void igb_down(struct igb_adapter *adapter) netdev->tx_queue_len = adapter->tx_queue_len; netif_carrier_off(netdev); + + /* record the stats before reset*/ + igb_update_stats(adapter); + adapter->link_speed = 0; adapter->link_duplex = 0;