From: David Miller <davem@davemloft.net>
To: weid@np.css.fujitsu.com
Cc: netdev@vger.kernel.org
Subject: Re: Fix "ipOutNoRoutes" counter error for TCP and UDP
Date: Mon, 26 Feb 2007 17:08:32 -0800 (PST) [thread overview]
Message-ID: <20070226.170832.71092126.davem@davemloft.net> (raw)
In-Reply-To: <1171465429.7069.18.camel@LINE>
From: weidong <weid@np.css.fujitsu.com>
Date: Wed, 14 Feb 2007 10:03:49 -0500
> Hi, All
> When I tested Linux-2.6.20 and found that counter "ipOutNoRoutes" can
> not increase correctly.
> The criteria is RFC2011
>
> ipOutNoRoutes OBJECT-TYPE
> SYNTAX Counter32
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> "The number of IP datagrams discarded because no route could
> be found to transmit them to their destination. Note that
> this counter includes any packets counted in ipForwDatagrams
> which meet this `no-route' criterion. Note that this
> includes any datagrams which a host cannot route because all
> of its default routers are down."
> ::= { ip 12 }
>
> In current Linux TCP/IP stack, maybe we should not increase this counter
> in "input path", but only increase it in "output path" due to the TCP/IP
> stack performance.
>
> Now in "output path", when TCP client tries to connect to an unreachable
> server(net unreachable, so no route can be found), this counter has no
> increment. When we use UDP sending UDP datagram to an net unreachable
> address, this counter also has no increment.
>
> Function need to fix:
> tcp_v4_connect(); ip4_datagram_connect(); udp_sendmsg();
>
> The following patch can fix the problems mentioned above
Thank you for this patch.
I think we need to make these checks more carefully.
Route lookup can fail for several reasons other than
no route being available. Two examples are:
1) Out of memory error while creating route
2) IPSEC disallows communication to that flow ID
As a result, we'll probably best limiting the counter
increment when the error is either -EHOSTUNREACH or
-ENETUNREACH.
Probably, since this logic will be duplicated to several
locations, you'll want to implement the test inside of
a helper inline function.
next prev parent reply other threads:[~2007-02-27 1:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-14 15:03 Fix "ipOutNoRoutes" counter error for TCP and UDP weidong
2007-02-27 1:08 ` David Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-03-27 10:53 Wei Dong
2007-03-28 1:15 weidong
2007-04-25 7:39 weidong
[not found] <462F029D.5070301@cn.fujitsu.com>
2007-04-25 8:27 ` David Miller
2007-04-25 9:04 weidong
2007-05-31 1:16 Wei Dong
2007-05-31 1:38 ` David Miller
2007-06-01 4:41 ` David Miller
2007-06-01 5:37 ` weidong
2007-06-01 5:49 ` David Miller
2007-05-31 1:18 Wei Dong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070226.170832.71092126.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=weid@np.css.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).