Subject: Re: counting dropped packets for UDP.
To: Darren Reed <avalon@cairo.anu.edu.au>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-net
Date: 08/12/2004 15:13:09
In message <200408100850.i7A8oWCv021531@cairo.anu.edu.au>,
Darren Reed writes:
>I'm not sure how useful this is, given that UDP packet loss can happen
>in many other ways, but this at least is intended to allow an application
>to see what sort of loss it is experiencing due to buffering problems.
I'd find it useful. netstat -s -p udp shows a count of input drops
``due to full socket buffers''. But when the count is high, I want to
know *which* socket incurred the errors. (e.g,. was it the IKE socket,
when running IPsec in a non-toy-domain, and not keeping up?)
Four bytes per socket for all sockets, plus a couple of extra
instructions in an codepath thats already only for exceptional
conditions. Seems reasonable to me. Many people will never want it,
but if you *do* want it, its great.
>Is it worth adding in the relevant line of code, here and there, for TCP?
Uh... surely that should never happen, due to TCP's window and the
initial window negotiation? I suppose you could try it and see, but I
dont see it being useful (outside of diganosing busted TCPs, maybe).
OTOH, maybe I just need more coffee.
>Or is it just a stupid idea, anyway ?
You have my opinion. YMMV.
>The patches below cover AF_INET{,6} and AF_UNIX.
[diff smipped]