Subject: Re: udp receive buffer overflow with many small packets
To: Hubert Feyrer <hubert@feyrer.de>
From: Stuart Brooks <stuartb@cat.co.za>
List: tech-net
Date: 04/21/2005 16:05:09
> On Thu, 21 Apr 2005, Stuart Brooks wrote:
> > I get exactly the same thing on Netbsd 2.0. If I send 170 packets,
164
> > get through and netstat -s shows 6 more udp packets dropped due to
full
> > socket buffers. The packets are 88 bytes each, but increasing the
size
> > (within reason) makes no difference. eg 200B/packet also yields an
> > overflow after 164 packets.
>
> UDP... I think there was some checksum problem reported/discussed
lately,
> dunno if that's related. Can you try -current?
I've got -current from 17 days ago and that exhibits the same symptoms.
Looks to me like it's hitting an mbuf limit in
uipc_usrreq.c:unp_output(...). I've gone a few levels down but it gets
pretty murky without a clear picture of what's going on (this is the
first time I've had a look at this code). Something to do with not being
able to get a new mbuf out of the pool cache without a WAIT condition.
It's not a bug (I don't think) but I was wondering whether that limit is
a settable parameter or not. It would be great to be able to set it on a
per-socket basis...