* Unwanted aliasing of UDP checksum failed error counter @ 2010-10-26 19:53 Jeremy Jackson 2010-10-26 20:13 ` Eric Dumazet 0 siblings, 1 reply; 6+ messages in thread From: Jeremy Jackson @ 2010-10-26 19:53 UTC (permalink / raw) To: netdev Trying to find source of packet loss on an 8node compute cluster, we find: (not in this example, but on the real cluster) in /proc/sys/net/snmp Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors Udp: 976460 1750 0 986795 0 0 InErrors *and* RcvbufErrors both go up with full socket buffer, this has made troubleshooting our application more difficult. We were chasing UDP checksum problems, until we checked linux source code, and found aliasing. Is this done for assembly code efficiency? Any reason ENOMEM (ie socket buffer full) can't avoid aliasing to UDP checksum failed errors? in linux-source-2.6.32/net/ipv4/udp.c:__udp_queue_rcv_skb() .... /* Note that an ENOMEM error is charged twice */ if (rc == -ENOMEM) { UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, is_udplite); atomic_inc(&sk->sk_drops); } goto drop; ... drop: UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unwanted aliasing of UDP checksum failed error counter 2010-10-26 19:53 Unwanted aliasing of UDP checksum failed error counter Jeremy Jackson @ 2010-10-26 20:13 ` Eric Dumazet 2010-10-26 20:21 ` Jeremy Jackson 0 siblings, 1 reply; 6+ messages in thread From: Eric Dumazet @ 2010-10-26 20:13 UTC (permalink / raw) To: Jeremy Jackson; +Cc: netdev Le mardi 26 octobre 2010 à 15:53 -0400, Jeremy Jackson a écrit : > Trying to find source of packet loss on an 8node compute cluster, we find: > (not in this example, but on the real cluster) > > in /proc/sys/net/snmp > Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors > Udp: 976460 1750 0 986795 0 0 > > InErrors *and* RcvbufErrors both go up with full socket buffer, this has > made troubleshooting our application more difficult. We were chasing UDP > checksum problems, until we checked linux source code, and found aliasing. > > Is this done for assembly code efficiency? Any reason ENOMEM (ie socket > buffer full) can't avoid aliasing to UDP checksum failed errors? > > in linux-source-2.6.32/net/ipv4/udp.c:__udp_queue_rcv_skb() > .... > /* Note that an ENOMEM error is charged twice */ > if (rc == -ENOMEM) { > UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, > is_udplite); > atomic_inc(&sk->sk_drops); > } > goto drop; > ... > drop: > UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); > In MIBS, there is no counter for UDP checksum errors So we use the standard UDP_MIB_INERRORS udpInErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The number of received UDP datagrams that could not be delivered for reasons other than the lack of an application at the destination port. We could add a LINUX specific MIB entry, eventually... ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unwanted aliasing of UDP checksum failed error counter 2010-10-26 20:13 ` Eric Dumazet @ 2010-10-26 20:21 ` Jeremy Jackson 2010-10-26 20:27 ` Eric Dumazet 0 siblings, 1 reply; 6+ messages in thread From: Jeremy Jackson @ 2010-10-26 20:21 UTC (permalink / raw) To: Eric Dumazet; +Cc: Jeremy Jackson, netdev > Le mardi 26 octobre 2010 à 15:53 -0400, Jeremy Jackson a écrit : >> Trying to find source of packet loss on an 8node compute cluster, we >> find: >> (not in this example, but on the real cluster) >> >> in /proc/sys/net/snmp >> Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors >> Udp: 976460 1750 0 986795 0 0 >> >> InErrors *and* RcvbufErrors both go up with full socket buffer, this has >> made troubleshooting our application more difficult. We were chasing >> UDP >> checksum problems, until we checked linux source code, and found >> aliasing. >> >> Is this done for assembly code efficiency? Any reason ENOMEM (ie socket >> buffer full) can't avoid aliasing to UDP checksum failed errors? >> >> in linux-source-2.6.32/net/ipv4/udp.c:__udp_queue_rcv_skb() >> .... >> /* Note that an ENOMEM error is charged twice */ >> if (rc == -ENOMEM) { >> UDP_INC_STATS_BH(sock_net(sk), >> UDP_MIB_RCVBUFERRORS, >> is_udplite); >> atomic_inc(&sk->sk_drops); >> } >> goto drop; >> ... >> drop: >> UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); >> > > In MIBS, there is no counter for UDP checksum errors > > So we use the standard UDP_MIB_INERRORS Yes, this part I understand, but what I don't understand is why ENOMEM errors *and* checksum errors both use the same counter, while ENOMEM has it's own already. > udpInErrors OBJECT-TYPE > SYNTAX Counter32 > MAX-ACCESS read-only > STATUS current > DESCRIPTION > "The number of received UDP datagrams that could not be > delivered for reasons other than the lack of an > application at the destination port. > > > We could add a LINUX specific MIB entry, eventually... > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Unwanted aliasing of UDP checksum failed error counter 2010-10-26 20:21 ` Jeremy Jackson @ 2010-10-26 20:27 ` Eric Dumazet 2010-10-27 9:35 ` [PATCH] ipv6/udp: report SndbufErrors and RcvbufErrors Eric Dumazet 0 siblings, 1 reply; 6+ messages in thread From: Eric Dumazet @ 2010-10-26 20:27 UTC (permalink / raw) To: Jeremy Jackson; +Cc: netdev Le mardi 26 octobre 2010 à 16:21 -0400, Jeremy Jackson a écrit : > > Le mardi 26 octobre 2010 à 15:53 -0400, Jeremy Jackson a écrit : > >> Trying to find source of packet loss on an 8node compute cluster, we > >> find: > >> (not in this example, but on the real cluster) > >> > >> in /proc/sys/net/snmp > >> Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors > >> Udp: 976460 1750 0 986795 0 0 > >> > >> InErrors *and* RcvbufErrors both go up with full socket buffer, this has > >> made troubleshooting our application more difficult. We were chasing > >> UDP > >> checksum problems, until we checked linux source code, and found > >> aliasing. > >> > >> Is this done for assembly code efficiency? Any reason ENOMEM (ie socket > >> buffer full) can't avoid aliasing to UDP checksum failed errors? > >> > >> in linux-source-2.6.32/net/ipv4/udp.c:__udp_queue_rcv_skb() > >> .... > >> /* Note that an ENOMEM error is charged twice */ > >> if (rc == -ENOMEM) { > >> UDP_INC_STATS_BH(sock_net(sk), > >> UDP_MIB_RCVBUFERRORS, > >> is_udplite); > >> atomic_inc(&sk->sk_drops); > >> } > >> goto drop; > >> ... > >> drop: > >> UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); > >> > > > > In MIBS, there is no counter for UDP checksum errors > > > > So we use the standard UDP_MIB_INERRORS > > Yes, this part I understand, but what I don't understand is why ENOMEM > errors *and* checksum errors both use the same counter, while ENOMEM has > it's own already. Because ENOMEM errors were handled in commit 81aa646c, but _all_ errors must also be accounted in INERRORS, to be RFC compliant. [IPV4]: add the UdpSndbufErrors and UdpRcvbufErrors MIBs If we add a new MIB counter for checksum errors, a bad checksum packet will increment both this new counter and INERRORS. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ipv6/udp: report SndbufErrors and RcvbufErrors 2010-10-26 20:27 ` Eric Dumazet @ 2010-10-27 9:35 ` Eric Dumazet 2010-10-30 23:17 ` David Miller 0 siblings, 1 reply; 6+ messages in thread From: Eric Dumazet @ 2010-10-27 9:35 UTC (permalink / raw) To: David Miller; +Cc: netdev, stable commit a18135eb9389 (Add UDP_MIB_{SND,RCV}BUFERRORS handling.) forgot to make the necessary changes in net/ipv6/proc.c to report additional counters in /proc/net/snmp6 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> --- net/ipv6/proc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index d082eae..24b3558 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c @@ -126,6 +126,8 @@ static const struct snmp_mib snmp6_udp6_list[] = { SNMP_MIB_ITEM("Udp6NoPorts", UDP_MIB_NOPORTS), SNMP_MIB_ITEM("Udp6InErrors", UDP_MIB_INERRORS), SNMP_MIB_ITEM("Udp6OutDatagrams", UDP_MIB_OUTDATAGRAMS), + SNMP_MIB_ITEM("Udp6RcvbufErrors", UDP_MIB_RCVBUFERRORS), + SNMP_MIB_ITEM("Udp6SndbufErrors", UDP_MIB_SNDBUFERRORS), SNMP_MIB_SENTINEL }; @@ -134,6 +136,8 @@ static const struct snmp_mib snmp6_udplite6_list[] = { SNMP_MIB_ITEM("UdpLite6NoPorts", UDP_MIB_NOPORTS), SNMP_MIB_ITEM("UdpLite6InErrors", UDP_MIB_INERRORS), SNMP_MIB_ITEM("UdpLite6OutDatagrams", UDP_MIB_OUTDATAGRAMS), + SNMP_MIB_ITEM("UdpLite6RcvbufErrors", UDP_MIB_RCVBUFERRORS), + SNMP_MIB_ITEM("UdpLite6SndbufErrors", UDP_MIB_SNDBUFERRORS), SNMP_MIB_SENTINEL }; ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ipv6/udp: report SndbufErrors and RcvbufErrors 2010-10-27 9:35 ` [PATCH] ipv6/udp: report SndbufErrors and RcvbufErrors Eric Dumazet @ 2010-10-30 23:17 ` David Miller 0 siblings, 0 replies; 6+ messages in thread From: David Miller @ 2010-10-30 23:17 UTC (permalink / raw) To: eric.dumazet; +Cc: netdev, stable From: Eric Dumazet <eric.dumazet@gmail.com> Date: Wed, 27 Oct 2010 11:35:16 +0200 > commit a18135eb9389 (Add UDP_MIB_{SND,RCV}BUFERRORS handling.) > forgot to make the necessary changes in net/ipv6/proc.c to report > additional counters in /proc/net/snmp6 > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Applied. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-30 23:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-26 19:53 Unwanted aliasing of UDP checksum failed error counter Jeremy Jackson 2010-10-26 20:13 ` Eric Dumazet 2010-10-26 20:21 ` Jeremy Jackson 2010-10-26 20:27 ` Eric Dumazet 2010-10-27 9:35 ` [PATCH] ipv6/udp: report SndbufErrors and RcvbufErrors Eric Dumazet 2010-10-30 23:17 ` 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).