netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: andi@firstfloor.org, wangchen@cn.fujitsu.com,
	herbert@gondor.apana.org.au, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter
Date: Sun, 18 Nov 2007 14:14:36 -0800	[thread overview]
Message-ID: <4740B94C.6080308@linux-foundation.org> (raw)
In-Reply-To: <20071117.160926.232024605.davem@davemloft.net>

David Miller wrote:
> From: Andi Kleen <andi@firstfloor.org>
> Date: Sat, 17 Nov 2007 14:18:46 +0100
>
>   
>> Wang Chen <wangchen@cn.fujitsu.com> writes:
>>
>>     
>>> Herbert Xu said the following on 2007-11-16 12:11:
>>>       
>>>> Wang Chen <wangchen@cn.fujitsu.com> wrote:
>>>>         
>>>>> So, I think the checksum in udp_queue_rcv_skb() actually does
>>>>> the work, not that in udp_recvmsg() and udp_poll().
>>>>>
>>>>> If I am wrong, please point out.
>>>>>           
>>>> We may have a bug in the accounting area.  Check the recent
>>>> patch made to UDP/IPv6 which is probably needed here as well.
>>>>
>>>>         
>>> Like dave said, decrementing the InDataGrams in this case is an
>>> option.
>>> I will check the same place of UDP/IPv6.
>>>       
>> And like Benny pointed out it's probably a bad idea because
>> decrementing counters will be an unexpected ABI change for monitoring 
>> programs who have no other way to detect overflow.
>>     
>
> We could defer the increment until we check the checksum,
> but that is likely to break even more things because people
> (as Wang Chen did initially) will send a packet to some
> port with an app that doesn't eat the packets, and expect the
> InDatagrams counter to increase once the stack eats the packet.
> But it won't until the application does the read.
>
> All of our options suck, we just have to choose the least sucking one
> and right now to me that's decrementing the counter as much as I
> empathize with the SNMP application overflow detection issue.
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   
You might be able hide the problem by adding some "defered tick logic" 
so that the
counter is monotonic. Kind of like the NTP clock holding hack.


      parent reply	other threads:[~2007-11-18 22:16 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-16  2:46 [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter Wang Chen
2007-11-16  2:54 ` David Miller
2007-11-16  3:18   ` Wang Chen
2007-11-16  4:04     ` David Miller
2007-11-16  4:13       ` Wang Chen
2007-11-16 17:02       ` Benny Amorsen
2007-11-16  4:11     ` Herbert Xu
2007-11-16  4:17       ` Wang Chen
2007-11-17 13:18         ` Andi Kleen
2007-11-18  0:09           ` David Miller
2007-11-18 21:45             ` Andi Kleen
2007-11-18 22:40               ` David Miller
2007-11-19  1:09                 ` Herbert Xu
2007-11-19  8:26                   ` David Miller
2007-11-19  2:02                 ` Wang Chen
2007-11-19  8:30                   ` David Miller
2007-11-19  4:41                 ` Herbert Xu
2007-11-19  8:32                   ` David Miller
2007-11-19 11:49                   ` Arnaldo Carvalho de Melo
2007-11-19 15:29                 ` Andi Kleen
2007-11-19 22:23                   ` David Miller
2007-11-20  5:29                     ` Bill Fink
2007-11-20  6:15                       ` David Miller
2007-11-20  6:25                         ` Wang Chen
2007-11-20  6:31                           ` Herbert Xu
2007-11-20 14:05                       ` Andi Kleen
2007-11-21  1:39                         ` David Miller
2007-11-29  7:55                           ` Wang Chen
2007-11-29  9:21                             ` Herbert Xu
2007-11-29 10:08                               ` Wang Chen
2007-11-29 10:21                                 ` Herbert Xu
2007-11-29 10:33                                   ` Wang Chen
2007-11-29 10:38                                     ` Herbert Xu
2007-11-29 10:56                                 ` Gerrit Renker
2007-11-29 12:01                                   ` Herbert Xu
2007-11-18 22:14             ` Stephen Hemminger [this message]

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=4740B94C.6080308@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=wangchen@cn.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).