Subject: Re: "const int" in conf/param.c?
To: None <>
From: None <>
List: tech-kern
Date: 04/26/1999 12:52:41
On 25 Apr, Jonathan Stone wrote:
> Yes, there is. Historically they were 512 bytes or 1k.  I agitated to
> get those few ports which hadn't bumped them to 2k to do so, so that
> single mbuf cluster can hold an entire Ethernet frame (common packet
> size).  The assumption is that most machines have sufficent memory
> that wasting ~512k is a win over the costs of allocating and
> deallocating two clusters.

Don't you mean wasting ~1/2k?

This still doesn't solve the problem of mid sized ethernet packets
needing two mbufs, and the somewhat obfuscated code needed to allocate
mbufs and clusters correctly c.f. dev/ic/dp8390.c. It wouldn't be so
awful if it weren't for the extra jiggery pokery with:

	mbuf packet headers
	aligning the packet data, while keeping the packet headers in the mbuf
	removing the packet headers after the bpf tap

There are better ways of working with mbufs than the way used in
dev/ic/dp8390.c even if they aren't _much_ better. I am sure that all
the maths to do with aligning packet data can be done at compile time.
If my laptop changes its memory alignment requirements or ethernet
headers change size while my laptop is running, I will be worried about
more than code elegance.

Oh well, that looks like today's rant over and done with.
Lloyd Parkes