tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: AF_UNIX socketpair dgram queue sizes



Michael van Elst <mlelstv%serpens.de@localhost> wrote:

> There are two limits:
> 
> sb_cc counts the valid bytes against sb_hiwat = SO_RCVBUF.
> sb_mbcnt counts the mbuf sizes against sb_mbmax = 2 * SO_RCVBUF.

That second part was the piece I was missing!

> Either limit gives you an amount of free space in the buffer
> and the minimum is the limit for the write operation. This
> is calculated in sbspace().

Right, that makes sense now.  Thanks!

By the way, it strikes me as odd to treat dgrams with
in between 400 and 857 bytes as special.  That's the
only scenario where we use two normal mbufs.  Is this
a frequent enough case that makes it worth treating
as special instead of simplifying to e.g., dgrams <
400 => 1 mbuf, dgrams > 400 => 1 mbcluster ?

-Jan


Home | Main Index | Thread Index | Old Index