Bug 6660
Summary: | ipv4/udp.c: counting InDatagrams which are never delivered | ||
---|---|---|---|
Product: | Networking | Reporter: | Gerrit Renker (gerrit) |
Component: | IPV4 | Assignee: | Stephen Hemminger (stephen) |
Status: | VERIFIED CODE_FIX | ||
Severity: | low | ||
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.17 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
Patch to fix doubly-counted udp.c InDatagrams
Fixes doubly-counted datagrams which failed UDP checksum in udp_recvmsg(). Fixes doubly-counted datagrams which failed UDP checksum in udp_recvmsg() AND in udp_poll() |
Description
Gerrit Renker
2006-06-07 02:22:09 UTC
Created attachment 8270 [details]
Patch to fix doubly-counted udp.c InDatagrams
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).
This lead to correct counting behaviour (verified in 4 sets of 9x
50000 UDP datagrams) on both rc and stable kernel.
Created attachment 8289 [details]
Fixes doubly-counted datagrams which failed UDP checksum in udp_recvmsg().
This patch improves on the previous one: the previous one would break
applications such as NFS which do not use udp_recvmsg(). This solution
was discussed on the mailing list and is based on decrementing InDatagrams
when an error occurred.
sorry, i accidently changed this bug... putting bug back to previous state Comment on attachment 8289 [details]
Fixes doubly-counted datagrams which failed UDP checksum in udp_recvmsg().
This one does not take udp_poll() into account (where the same problem as in
udp_recvmsg() crops up).
Created attachment 9125 [details]
Fixes doubly-counted datagrams which failed UDP checksum in udp_recvmsg() AND in udp_poll()
This is an update, the previous patch did not take udp_poll() into
consideration. A cleaner solution would be to instead shift the increment
of MIB_DATAGRAMS out of udp_queue_rcv_skb() to udp_recvmsg(); this however
entails
(i) revise all clients that use data_ready handler (sunrpc)
(ii) decide what to do with udp_poll()
|