public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: netdev@vger.kernel.org, Stephen Hemminger <shemminger@vyatta.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH] IP: Increment INADDRERRORS if routing for a packet is not successful
Date: Wed, 02 Jun 2010 00:07:34 +0200	[thread overview]
Message-ID: <1275430054.2638.115.camel@edumazet-laptop> (raw)
In-Reply-To: <alpine.DEB.2.00.1006011609280.9438@router.home>

Le mardi 01 juin 2010 à 16:13 -0500, Christoph Lameter a écrit :
> Something like this would have been very helpful during recent debugging
> of multicast issues. Silent discards are bad.
> 

> 
> If the kernel perceives that something is wrong with an incoming packet then the
> IP stack currently silently discards packets. This makes it difficult to diagnose
> problems with the network configurations (such as a misbehaving kernel
> subsystem discarding multicast packets because the reverse path filter
> does not like multicast subscriptions on the second NIC with rp_filter=1).
> 
> It is also necessary to know how many inbound packets are discarded to
> assess networking issues in general with a NIC.
> 
> Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
> 

I disagree with this patch.

IPSTATS_MIB_INADDRERRORS has a strong meaning, part of RFCS.

In this path, we simulate the routing of a virtual packet, not its
delivery.

This should not affect IPSTATS SNMP entries.

You should use another MIB entry, say LINUX_MIB_INROUTEERRORS ?

Dont inet_rtm_getroute() caller gets an error status anyway ?

> ---
>  net/ipv4/route.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> Index: linux-2.6/net/ipv4/route.c
> ===================================================================
> --- linux-2.6.orig/net/ipv4/route.c	2010-06-01 11:46:10.000000000 -0500
> +++ linux-2.6/net/ipv4/route.c	2010-06-01 11:52:55.000000000 -0500
> @@ -2981,6 +2981,9 @@ static int inet_rtm_getroute(struct sk_b
>  		rt = skb_rtable(skb);
>  		if (err == 0 && rt->u.dst.error)
>  			err = -rt->u.dst.error;
> +		if (err)
> +			IP_INC_STATS_BH(dev_net(skb->dev),
> +					IPSTATS_MIB_INADDRERRORS);
>  	} else {
>  		struct flowi fl = {
>  			.nl_u = {
> 
> 



  reply	other threads:[~2010-06-01 22:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 21:13 [PATCH] IP: Increment INADDRERRORS if routing for a packet is not successful Christoph Lameter
2010-06-01 22:07 ` Eric Dumazet [this message]
2010-06-01 22:23   ` David Miller
2010-06-02 15:27   ` Christoph Lameter
2010-06-02 15:29     ` David Miller
2010-06-02 15:32     ` Eric Dumazet
2010-06-02 16:12       ` Christoph Lameter
2010-06-02 16:19         ` David Miller
2010-06-02 16:27           ` Christoph Lameter
2010-06-02 16:33             ` Eric Dumazet
2010-06-02 16:49               ` Christoph Lameter
2010-06-02 17:12                 ` David Miller
2010-06-02 17:19                   ` Eric Dumazet
2010-06-02 17:41                     ` Neil Horman
2010-06-02 17:31                   ` David Miller
2010-06-02 17:46                     ` Eric Dumazet
2010-06-02 18:01                       ` Christoph Lameter
2010-06-02 18:41                         ` Eric Dumazet
2010-06-02 18:59                           ` Christoph Lameter
2010-06-02 19:25                             ` Eric Dumazet
2010-06-02 20:11                               ` Christoph Lameter
2010-06-02 22:05                                 ` [PATCH net-next-2.6] ipv4: add LINUX_MIB_IPRPFILTER snmp counter Eric Dumazet
2010-06-03 10:19                                   ` David Miller
2010-06-03  3:50                     ` [PATCH] IP: Increment INADDRERRORS if routing for a packet is not successful Bill Fink
2010-06-03  3:54                       ` Eric Dumazet
2010-06-03  4:56                         ` Bill Fink
2010-06-02 16:28         ` Eric Dumazet
2010-06-02 16:35           ` Christoph Lameter

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=1275430054.2638.115.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=cl@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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