From: Andi Kleen <andi@firstfloor.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH] Add a statistics counter for tx hash miss
Date: Mon, 21 Jul 2008 10:48:08 +0200 [thread overview]
Message-ID: <1216630088-10328-2-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1216630088-10328-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <andi@basil.nowhere.org>
Add a counter for the case when the TX hash function doesn't work.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
include/linux/snmp.h | 1 +
net/core/dev.c | 3 +++
net/ipv4/proc.c | 1 +
3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/linux/snmp.h b/include/linux/snmp.h
index 5df62ef..c4d69b7 100644
--- a/include/linux/snmp.h
+++ b/include/linux/snmp.h
@@ -214,6 +214,7 @@ enum
LINUX_MIB_TCPDSACKIGNOREDOLD, /* TCPSACKIgnoredOld */
LINUX_MIB_TCPDSACKIGNOREDNOUNDO, /* TCPSACKIgnoredNoUndo */
LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */
+ LINUX_MIB_TXHASHMISS, /* TxHashMiss */
__LINUX_MIB_MAX
};
diff --git a/net/core/dev.c b/net/core/dev.c
index c35fefc..cc45878 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -124,6 +124,7 @@
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/in.h>
+#include <net/ip.h>
#include "net-sysfs.h"
@@ -1688,6 +1689,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb)
alen = 8;
break;
default:
+ NET_INC_STATS_BH(dev_net(dev), LINUX_MIB_TXHASHMISS);
return 0;
}
@@ -1712,6 +1714,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb)
break;
default:
+ NET_INC_STATS_BH(dev_net(dev), LINUX_MIB_TXHASHMISS);
break;
}
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 834356e..f621b87 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -232,6 +232,7 @@ static const struct snmp_mib snmp4_net_list[] = {
SNMP_MIB_ITEM("TCPDSACKIgnoredOld", LINUX_MIB_TCPDSACKIGNOREDOLD),
SNMP_MIB_ITEM("TCPDSACKIgnoredNoUndo", LINUX_MIB_TCPDSACKIGNOREDNOUNDO),
SNMP_MIB_ITEM("TCPSpuriousRTOs", LINUX_MIB_TCPSPURIOUSRTOS),
+ SNMP_MIB_ITEM("TxHashMiss", LINUX_MIB_TXHASHMISS),
SNMP_MIB_SENTINEL
};
--
1.5.6
next prev parent reply other threads:[~2008-07-21 8:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 8:48 [PATCH] Make simple TX hash little endian safe Andi Kleen
2008-07-21 8:48 ` Andi Kleen [this message]
2008-07-21 16:33 ` [PATCH] Add a statistics counter for tx hash miss David Miller
2008-07-21 16:44 ` Andi Kleen
2008-07-21 16:51 ` David Miller
2008-07-21 12:32 ` [PATCH] Make simple TX hash little endian safe Jarek Poplawski
2008-07-21 15:17 ` Andi Kleen
2008-07-21 16:44 ` David Miller
2008-07-21 17:20 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1216630088-10328-2-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).