Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered

2006-06-12 Thread Gerrit Renker
Quoting David Miller: | | Fix: Move the `UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS)' statement from | udp_queue_rcv_skb to udp_recvmsg. Now InDatagrams only counts those | datagrams which were really delivered (as per RFC 2013). | | | Unfortunately this breaks NFS and

Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered

2006-06-12 Thread David Miller
From: Gerrit Renker [EMAIL PROTECTED] Date: Mon, 12 Jun 2006 07:02:45 +0100 This is clearly preferable - would it look like this: csum_copy_err: UDP_INC_STATS_BH(UDP_MIB_INERRORS); UDP_DEC_STATS_BH(UDP_MIB_INDATAGRAMS); /* requires new macro */ skb_kill_datagram(sk, skb,

Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered

2006-06-12 Thread Herbert Xu
David Miller [EMAIL PROTECTED] wrote: Probably a better way to handle this is to correct the INDATAGRAMS value by decrementing it when we notice that the checksum is incorrect in a deferred manner. I think sunrpc should instead increment the appropriate counters directly as otherwise

Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered

2006-06-12 Thread David Miller
From: Herbert Xu [EMAIL PROTECTED] Date: Mon, 12 Jun 2006 16:18:09 +1000 David Miller [EMAIL PROTECTED] wrote: Probably a better way to handle this is to correct the INDATAGRAMS value by decrementing it when we notice that the checksum is incorrect in a deferred manner. I think

Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered

2006-06-12 Thread Gerrit Renker
The code below implements the discussed solution of decrementing InDatagrams if a datagram fails the checksum within udp_recvmsg(). I have given it a quick test / build and checked the outcome against previous results: I now obtained correct counter values, i.e. the application counted exactly

Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered

2006-06-12 Thread Herbert Xu
On Sun, Jun 11, 2006 at 11:49:05PM -0700, David Miller wrote: Yeah. Good point. But how much protocol internals do we want to slide into the -data_ready() callbacks of such layers? That's ugly and something we should try to avoid. I agree with the objective of minimising the exposure of

Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered

2006-06-11 Thread David Miller
From: Gerrit Renker [EMAIL PROTECTED] Date: Tue, 6 Jun 2006 19:25:40 +0100 Fix: Move the `UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS)' statement from udp_queue_rcv_skb to udp_recvmsg. Now InDatagrams only counts those datagrams which were really delivered (as per RFC 2013).