From patchwork Sat Nov 5 01:53:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: david decotigny X-Patchwork-Id: 123727 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.180.67]) by ozlabs.org (Postfix) with ESMTP id EBEC5B6FA5 for ; Sat, 5 Nov 2011 12:54:30 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753390Ab1KEByF (ORCPT ); Fri, 4 Nov 2011 21:54:05 -0400 Received: from smtp-out.google.com ([74.125.121.67]:44272 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413Ab1KEBx6 (ORCPT ); Fri, 4 Nov 2011 21:53:58 -0400 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id pA51ritm006147; Fri, 4 Nov 2011 18:53:44 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1320458024; bh=nJnZkaKL4SdPQuNnCp9crUlnvw8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: In-Reply-To:References; b=LTewWPAdpYIXoSarS0ip7Q2pvOXmJmWZqNKnnvY1VwB+uoo1BSy+/g2vb0hGRwNIS pfg1mAimS9K41kndDVk1A== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to: references:in-reply-to:references:organization:x-system-of-record; b=tsAxR48QWE7giKxGX+DNL/bSSN1yoqFEikcTlQqYxItgt1SEVo3xRC7qr+MKHDe1l ZT4DPkey9B5JZ+PzpSbqw== Received: from decotigny.mtv.corp.google.com (decotigny.mtv.corp.google.com [172.18.64.159]) by wpaz21.hot.corp.google.com with ESMTP id pA51rf0D016567; Fri, 4 Nov 2011 18:53:42 -0700 Received: by decotigny.mtv.corp.google.com (Postfix, from userid 128857) id 3AFE025209; Fri, 4 Nov 2011 18:53:39 -0700 (PDT) From: David Decotigny To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "David S. Miller" , Ian Campbell , Eric Dumazet , Jeff Kirsher , Jiri Pirko , Joe Perches , Szymon Janc , Sameer Nanda , David Decotigny Subject: [PATCH net v3 7/9] forcedeth: new ethtool stat "tx_timeout" to account for tx_timeouts Date: Fri, 4 Nov 2011 18:53:31 -0700 Message-Id: X-Mailer: git-send-email 1.7.3.1 In-Reply-To: References: In-Reply-To: References: Organization: Google, Inc. X-System-Of-Record: true Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sameer Nanda This change publishes a new ethtool stats: tx_timeout that counts the number of times the tx_timeout callback was triggered. Signed-off-by: David Decotigny --- drivers/net/ethernet/nvidia/forcedeth.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index b26e7db..90cdf26 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c @@ -633,6 +633,7 @@ static const struct nv_ethtool_str nv_estats_str[] = { { "rx_packets" }, { "rx_errors_total" }, { "tx_errors_total" }, + { "tx_timeout" }, /* version 2 stats */ { "tx_deferral" }, @@ -673,6 +674,7 @@ struct nv_ethtool_stats { u64 rx_packets; u64 rx_errors_total; u64 tx_errors_total; + u64 tx_timeout; /* version 2 stats */ u64 tx_deferral; @@ -2529,6 +2531,8 @@ static void nv_tx_timeout(struct net_device *dev) spin_lock_irq(&np->lock); + np->estats.tx_timeout++; + /* 1) stop tx engine */ nv_stop_tx(dev);