diff mbox

[RFC,net-next-2.6] : xfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR

Message ID 1266500107.17794.167.camel@bigi
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

jamal Feb. 18, 2010, 1:35 p.m. UTC
On Wed, 2010-02-17 at 13:49 -0800, David Miller wrote:

> This should be fine, the tools just parse the lines individually
> as "string integer" pairs.
> 
> If you want to be super anal, add the new counter to the end of
> the array.

Ok, thanks - here is the updated patch.

cheers,
jamal
commit 9bc885a86cf4be134ddf09cec8113cde24bb5048
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Thu Feb 18 08:25:57 2010 -0500

    xfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR
    
    XFRMINHDRERROR counter is ambigous when validating forwarding
    path. It makes it tricky to debug when you have both in and fwd
    validation.
    
    Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>

Comments

David Miller Feb. 18, 2010, 11:44 p.m. UTC | #1
From: jamal <hadi@cyberus.ca>
Date: Thu, 18 Feb 2010 08:35:07 -0500

> On Wed, 2010-02-17 at 13:49 -0800, David Miller wrote:
> 
>> This should be fine, the tools just parse the lines individually
>> as "string integer" pairs.
>> 
>> If you want to be super anal, add the new counter to the end of
>> the array.
> 
> Ok, thanks - here is the updated patch.

Applied, thanks Jamal.
--
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 mbox

Patch

diff --git a/include/linux/snmp.h b/include/linux/snmp.h
index 0f953fe..e28f5a0 100644
--- a/include/linux/snmp.h
+++ b/include/linux/snmp.h
@@ -257,6 +257,7 @@  enum
 	LINUX_MIB_XFRMOUTPOLBLOCK,		/* XfrmOutPolBlock */
 	LINUX_MIB_XFRMOUTPOLDEAD,		/* XfrmOutPolDead */
 	LINUX_MIB_XFRMOUTPOLERROR,		/* XfrmOutPolError */
+	LINUX_MIB_XFRMFWDHDRERROR,		/* XfrmFwdHdrError*/
 	__LINUX_MIB_XFRMMAX
 };
 
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 2c5d931..4368e7b 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2045,8 +2045,7 @@  int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
 	int res;
 
 	if (xfrm_decode_session(skb, &fl, family) < 0) {
-		/* XXX: we should have something like FWDHDRERROR here. */
-		XFRM_INC_STATS(net, LINUX_MIB_XFRMINHDRERROR);
+		XFRM_INC_STATS(net, LINUX_MIB_XFRMFWDHDRERROR);
 		return 0;
 	}
 
diff --git a/net/xfrm/xfrm_proc.c b/net/xfrm/xfrm_proc.c
index 003f2c4..58d9ae0 100644
--- a/net/xfrm/xfrm_proc.c
+++ b/net/xfrm/xfrm_proc.c
@@ -41,6 +41,7 @@  static const struct snmp_mib xfrm_mib_list[] = {
 	SNMP_MIB_ITEM("XfrmOutPolBlock", LINUX_MIB_XFRMOUTPOLBLOCK),
 	SNMP_MIB_ITEM("XfrmOutPolDead", LINUX_MIB_XFRMOUTPOLDEAD),
 	SNMP_MIB_ITEM("XfrmOutPolError", LINUX_MIB_XFRMOUTPOLERROR),
+	SNMP_MIB_ITEM("XfrmFwdHdrError", LINUX_MIB_XFRMFWDHDRERROR),
 	SNMP_MIB_SENTINEL
 };