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

From: David Miller
Date: Wed May 14 2014 - 14:07:59 EST


From: zhuyj <zyjzyj2000@xxxxxxxxx>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/