snmp6: fix title of IPSTATS_MIB_CSUMERRORS
Subsystems (2)
PATCH 1/1 snmp6: fix title of IPSTATS_MIB_CSUMERRORS
Follow the same convention than other fields, prefix this stat by 'Ip6'.
---
In fact, I wonder if we cannot simply remove this stat for IPv6: there is no checksum in IPv6, so it will always be 0 (and in fact, this stats is only increased in net/ipv4/ip_input.c).
net/ipv6/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/proc.c +1 -1
@@ -90,7 +90,7 @@ static const struct snmp_mib snmp6_ipstats_list[] = {SNMP_MIB_ITEM ("Ip6OutMcastOctets" ,IPSTATS_MIB_OUTMCASTOCTETS ),SNMP_MIB_ITEM ("Ip6InBcastOctets" ,IPSTATS_MIB_INBCASTOCTETS ),SNMP_MIB_ITEM ("Ip6OutBcastOctets" ,IPSTATS_MIB_OUTBCASTOCTETS ), -SNMP_MIB_ITEM ("InCsumErrors" ,IPSTATS_MIB_CSUMERRORS ), +SNMP_MIB_ITEM ("Ip6InCsumErrors" ,IPSTATS_MIB_CSUMERRORS ), SNMP_MIB_SENTINEL };
Signature · 1 line
1.8.2.1
PATCH v2 1/1 snmp6: fix title of IPSTATS_MIB_CSUMERRORS
Follow the same convention than other fields, prefix this stat by 'Ip6'.
---
In fact, I wonder if we cannot simply remove this stat for IPv6: there is no checksum in IPv6, so it will always be 0 (and in fact, this stats is only increased in net/ipv4/ip_input.c).
v2: add Spotted-by line
net/ipv6/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/proc.c +1 -1
@@ -90,7 +90,7 @@ static const struct snmp_mib snmp6_ipstats_list[] = {SNMP_MIB_ITEM ("Ip6OutMcastOctets" ,IPSTATS_MIB_OUTMCASTOCTETS ),SNMP_MIB_ITEM ("Ip6InBcastOctets" ,IPSTATS_MIB_INBCASTOCTETS ),SNMP_MIB_ITEM ("Ip6OutBcastOctets" ,IPSTATS_MIB_OUTBCASTOCTETS ), -SNMP_MIB_ITEM ("InCsumErrors" ,IPSTATS_MIB_CSUMERRORS ), +SNMP_MIB_ITEM ("Ip6InCsumErrors" ,IPSTATS_MIB_CSUMERRORS ), SNMP_MIB_SENTINEL };
Signature · 1 line
1.8.2.1
Quoted 9 lines · Nicolas Dichtel
Follow the same convention than other fields, prefix this stat by 'Ip6'.
Spotted-by Fujie Zhao <[email protected]>Signed-off-by Nicolas Dichtel <[email protected]>---
In fact, I wonder if we cannot simply remove this stat for IPv6: there is no checksum in IPv6, so it will always be 0 (and in fact, this stats is only increased in
net/ipv4/ip_input.c).
You could put this line in a comment, so that a future reader knows why we do have a hole.
PATCH v3 1/1 snmp6: remove IPSTATS_MIB_CSUMERRORS
This stat is not relevant in IPv6, there is no checksum in IPv6 header. Just leave a comment to explain the hole.
---
v3: remove the stat, not relevant in IPv6
remove spotted-by because it was only for the 'wrong' stat name (missing prefix 'Ip6')
v2: add Spotted-by line
net/ipv6/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/proc.c +1 -1
@@ -90,7 +90,7 @@ static const struct snmp_mib snmp6_ipstats_list[] = {SNMP_MIB_ITEM ("Ip6OutMcastOctets" ,IPSTATS_MIB_OUTMCASTOCTETS ),SNMP_MIB_ITEM ("Ip6InBcastOctets" ,IPSTATS_MIB_INBCASTOCTETS ),SNMP_MIB_ITEM ("Ip6OutBcastOctets" ,IPSTATS_MIB_OUTBCASTOCTETS ), -SNMP_MIB_ITEM ("InCsumErrors" ,IPSTATS_MIB_CSUMERRORS ), +/* IPSTATS_MIB_CSUMERRORS is not relevant in IPv6 (no checksum) */ SNMP_MIB_SENTINEL };
Signature · 1 line
1.8.2.1
Re: [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS
Quoted 5 lines · Nicolas Dichtel
This stat is not relevant in IPv6, there is no checksum in IPv6 header. Just leave a comment to explain the hole.
Signed-off-by Nicolas Dichtel <[email protected]>---
Re: [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS
From: Eric Dumazet <[email protected]>
Date: Fri, 31 May 2013 10:11:36 -0700
Quoted 8 lines · Nicolas Dichtel
Quoted 5 lines
This stat is not relevant in IPv6, there is no checksum in IPv6 header. Just leave a comment to explain the hole.
Signed-off-by Nicolas Dichtel <[email protected]>---
Acked-by Eric Dumazet <[email protected]>
Applied, thanks.