Thread (36 messages) 36 messages, 9 authors, 2007-11-29

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2007-11-19 01:10:26

On Sun, Nov 18, 2007 at 02:40:10PM -0800, David Miller wrote:
The networking stack DID receive the packet.  Just because a socket
owner is busy doing something else or blocked on some other event
is no excuse not to bump the InDataGgrams counter.
Actually if we ever implement the memory reclaim stuff for UDP
when we're short on system memory then it could be possible for
us to want to remove packets that are sitting on a socket's rcv
queue.  In that case it would be nice if InDataGrams wasn't
incremented until the app took the packet off the socket.

In any case, I just looked up RFC1213 and it says:

          udpInDatagrams OBJECT-TYPE
              SYNTAX  Counter
              ACCESS  read-only
              STATUS  mandatory
              DESCRIPTION
                      "The total number of UDP datagrams delivered to
                      UDP users."
              ::= { udp 1 }

So I think incrementing it in recvmsg is acceptable.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help