icmp: account for ICMP out errors because of socket limit

3 messages, 2 authors, 2014-05-14 · open the first message on its own page

icmp: account for ICMP out errors because of socket limit

From: zhuyj <zyjzyj2000@gmail.com>
Date: 2014-05-12 03:19:36

Hi, Eric && David

  ____           ______________
|    |         |              |
| PC |<------->| MIPS 32 core |
|____|         |______________|

When ping from a PC to a board (MIPS 32 core), because of socket limit,
ping echo will fail. But ICMP_MIB_OUTERRORS counter is not incremented.
In this case, "netstat -s" can not report these errors.

This patch will fix this problem. Now it is in the attachment. Please 
check it.

Best Regards!
Zhu Yanjun

Re: icmp: account for ICMP out errors because of socket limit

From: zhuyj <zyjzyj2000@gmail.com>
Date: 2014-05-12 04:48:17

Hi, Eric && David

This patch is similar to the following patch.

commit 1f8438a853667d48055ad38384c63e94b32c6578
Author: Eric Dumazet [off-list ref]
Date:   Sat Apr 3 15:09:04 2010 -0700

     icmp: Account for ICMP out errors

     When ip_append() fails because of socket limit or memory shortage,
     increment ICMP_MIB_OUTERRORS counter, so that "netstat -s" can report
     these errors.

     LANG=C netstat -s | grep "ICMP messages failed"
         0 ICMP messages failed

     For IPV6, implement ICMP6_MIB_OUTERRORS counter as well.

     # grep Icmp6OutErrors /proc/net/dev_snmp6/*
     /proc/net/dev_snmp6/eth0:Icmp6OutErrors                     0
     /proc/net/dev_snmp6/lo:Icmp6OutErrors                       0

     Signed-off-by: Eric Dumazet [off-list ref]
     Signed-off-by: David S. Miller [off-list ref]

Best Regards!
Zhu Yanjun

On 05/12/2014 11:19 AM, zhuyj wrote:
Hi, Eric && David

 ____           ______________
|    |         |              |
| PC |<------->| MIPS 32 core |
|____|         |______________|

When ping from a PC to a board (MIPS 32 core), because of socket limit,
ping echo will fail. But ICMP_MIB_OUTERRORS counter is not incremented.
In this case, "netstat -s" can not report these errors.

This patch will fix this problem. Now it is in the attachment. Please 
check it.

Best Regards!
Zhu Yanjun

Re: icmp: account for ICMP out errors because of socket limit

From: David Miller <davem@davemloft.net>
Date: 2014-05-14 18:07:56

From: zhuyj <zyjzyj2000@gmail.com>
Date: Mon, 12 May 2014 11:19:28 +0800
Hi, Eric && David

 ____           ______________
|    |         |              |
| PC |<------->| MIPS 32 core |
|____|         |______________|

When ping from a PC to a board (MIPS 32 core), because of socket
limit,
ping echo will fail. But ICMP_MIB_OUTERRORS counter is not
incremented.
In this case, "netstat -s" can not report these errors.

This patch will fix this problem. Now it is in the attachment. Please
check it.
The only time icmp_xmit_lock() can fail is if we try to generate an ICMP
response to a failure to send another ICMP packet.

It is an entirely different situation from Eric's other patch which
you've mentioned in this thread, and I do not think this case warrants
a statistic bump at all.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help