Darren Reed wrote:
In thinking about experimenting with Solaris networking, I was
pondering how I could experiment with using different types of
buffer allocation schemes behind STREAMS.

If you want to experiment (as opposed to make it into product quality) then one way would be to overload the pri argument to allocb and friends to mean "the buffer pool".

The "pri" is an integer, but allocb() doesn't use its value today.

This would require some way for the different providers of buffer pools to register and get back a "handle" that would fit in an integer, and then a way to pass that handle to all the places where the relevant allocb() etc calls would be made.

The parameters into the buffer allocation would ideally be:
- size of buffer
- priority
- driver name and instance wanting it (hard/impossible?)

Having an "int alloc_register(name, instance, max_memory_to_use)" function that returns the handle would allow for this.

Of couse this would allow base (in esballoc/desballoc) to be
ignored.

I don't understand why you'd want to change that part.

   Erik
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to