: xfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR
Subsystems (3)
RFC PATCH 1/1 : xfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR
I had a hard time debugging some setup while testing xfrm by mark in presence of traffic being forwarded as well as being locally terminated. This change helped narrow things down a little for me. The danger is that it changes the /proc output which may break some user space tool (thats why i have it as an RFC).
cheers,
jamal
commit cba12a140f1c4cad34f55d1b01067c2d83ee0748
Author: Jamal Hadi Salim <[email protected]> Date: Wed Feb 17 06:26:52 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.
include/linux/snmp.h +1 -0
@@ -246,6 +246,7 @@ enumLINUX_MIB_XFRMINNOPOLS ,/* XfrmInNoPols */ LINUX_MIB_XFRMINPOLBLOCK ,/* XfrmInPolBlock */ LINUX_MIB_XFRMINPOLERROR ,/* XfrmInPolError */ +LINUX_MIB_XFRMFWDHDRERROR ,/* XfrmFwdHdrError*/ LINUX_MIB_XFRMOUTERROR ,/* XfrmOutError */ LINUX_MIB_XFRMOUTBUNDLEGENERROR ,/* XfrmOutBundleGenError */ LINUX_MIB_XFRMOUTBUNDLECHECKERROR, /* XfrmOutBundleCheckError */
net/xfrm/xfrm_policy.c +1 -2
@@ -2052,8 +2052,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 ; }
net/xfrm/xfrm_proc.c +1 -0
@@ -30,6 +30,7 @@ static const struct snmp_mib xfrm_mib_list[] = {SNMP_MIB_ITEM ("XfrmInNoPols" ,LINUX_MIB_XFRMINNOPOLS ),SNMP_MIB_ITEM ("XfrmInPolBlock" ,LINUX_MIB_XFRMINPOLBLOCK ),SNMP_MIB_ITEM ("XfrmInPolError" ,LINUX_MIB_XFRMINPOLERROR ), +SNMP_MIB_ITEM ("XfrmFwdHdrError" ,LINUX_MIB_XFRMFWDHDRERROR ),SNMP_MIB_ITEM ("XfrmOutError" ,LINUX_MIB_XFRMOUTERROR ),SNMP_MIB_ITEM ("XfrmOutBundleGenError" ,LINUX_MIB_XFRMOUTBUNDLEGENERROR ), SNMP_MIB_ITEM("XfrmOutBundleCheckError", LINUX_MIB_XFRMOUTBUNDLECHECKERROR),
David Miller
maintainerFrom: jamal <[email protected]>
Date: Wed, 17 Feb 2010 06:40:52 -0500
Quoted 7 lines
xfrm: Introduce
LINUX_MIB_XFRMFWDHDRERRORXFRMINHDRERROR 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 <[email protected]>
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.
Quoted 5 lines · David Miller
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 <[email protected]> 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.
include/linux/snmp.h +1 -0
@@ -257,6 +257,7 @@ enumLINUX_MIB_XFRMOUTPOLBLOCK ,/* XfrmOutPolBlock */ LINUX_MIB_XFRMOUTPOLDEAD ,/* XfrmOutPolDead */ LINUX_MIB_XFRMOUTPOLERROR ,/* XfrmOutPolError */ +LINUX_MIB_XFRMFWDHDRERROR ,/* XfrmFwdHdrError*/ __LINUX_MIB_XFRMMAX };
net/xfrm/xfrm_policy.c +1 -2
@@ -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 ; }
net/xfrm/xfrm_proc.c +1 -0
@@ -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 };
From: jamal <[email protected]>
Date: Thu, 18 Feb 2010 08:35:07 -0500
Quoted 9 lines · David Miller
Quoted 6 lines
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.