netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] snmp6: fix title of IPSTATS_MIB_CSUMERRORS
@ 2013-05-31 13:29 Nicolas Dichtel
  2013-05-31 13:32 ` [PATCH v2] " Nicolas Dichtel
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Dichtel @ 2013-05-31 13:29 UTC (permalink / raw)
  To: davem; +Cc: netdev, Nicolas Dichtel

Follow the same convention than other fields, prefix this stat by 'Ip6'.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---

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(-)

diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index f3c1ff4..33b97b0 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -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
 };
 
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] snmp6: fix title of IPSTATS_MIB_CSUMERRORS
  2013-05-31 13:29 [PATCH] snmp6: fix title of IPSTATS_MIB_CSUMERRORS Nicolas Dichtel
@ 2013-05-31 13:32 ` Nicolas Dichtel
  2013-05-31 15:13   ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Dichtel @ 2013-05-31 13:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, Nicolas Dichtel

Follow the same convention than other fields, prefix this stat by 'Ip6'.

Spotted-by: Fujie Zhao <fujie.zhao@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---

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(-)

diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index f3c1ff4..33b97b0 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -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
 };
 
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] snmp6: fix title of IPSTATS_MIB_CSUMERRORS
  2013-05-31 13:32 ` [PATCH v2] " Nicolas Dichtel
@ 2013-05-31 15:13   ` Eric Dumazet
  2013-05-31 15:37     ` [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS Nicolas Dichtel
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2013-05-31 15:13 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: davem, netdev

On Fri, 2013-05-31 at 15:32 +0200, Nicolas Dichtel wrote:
> Follow the same convention than other fields, prefix this stat by 'Ip6'.
> 
> Spotted-by: Fujie Zhao <fujie.zhao@6wind.com>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> 
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS
  2013-05-31 15:13   ` Eric Dumazet
@ 2013-05-31 15:37     ` Nicolas Dichtel
  2013-05-31 17:11       ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Dichtel @ 2013-05-31 15:37 UTC (permalink / raw)
  To: davem; +Cc: eric.dumazet, netdev, 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 <nicolas.dichtel@6wind.com>
---

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(-)

diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index f3c1ff4..51c3285 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -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
 };
 
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS
  2013-05-31 15:37     ` [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS Nicolas Dichtel
@ 2013-05-31 17:11       ` Eric Dumazet
  2013-05-31 23:27         ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2013-05-31 17:11 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: davem, netdev

On Fri, 2013-05-31 at 17:37 +0200, Nicolas Dichtel wrote:
> 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 <nicolas.dichtel@6wind.com>
> ---

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS
  2013-05-31 17:11       ` Eric Dumazet
@ 2013-05-31 23:27         ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-05-31 23:27 UTC (permalink / raw)
  To: eric.dumazet; +Cc: nicolas.dichtel, netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 31 May 2013 10:11:36 -0700

> On Fri, 2013-05-31 at 17:37 +0200, Nicolas Dichtel wrote:
>> 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 <nicolas.dichtel@6wind.com>
>> ---
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-31 23:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-31 13:29 [PATCH] snmp6: fix title of IPSTATS_MIB_CSUMERRORS Nicolas Dichtel
2013-05-31 13:32 ` [PATCH v2] " Nicolas Dichtel
2013-05-31 15:13   ` Eric Dumazet
2013-05-31 15:37     ` [PATCH v3] snmp6: remove IPSTATS_MIB_CSUMERRORS Nicolas Dichtel
2013-05-31 17:11       ` Eric Dumazet
2013-05-31 23:27         ` David Miller

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).