tech-net archive

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

Re: patch: sockaddr instead of mbuf to carry addresses



Hi Greg,

On 3/15/2015 8:28 AM, Greg Troxel wrote:
Not objecting, but can you articulate the gain?

Maintainability of the code with the intention that it makes simpler future improvements to the stack in general.

* No management of allocation / de-allocation. Realized when the change is complete for all per-user requests. * Use of static types would catch particular classes of errors at compile time instead of run-time. i.e. why use void * when you can use struct foo. * It is a continuation of work that was cut-short before the -7 branch where per-user requests were split from the monolithic proto switch. When everything was handled by the switch mbuf pointers were used to get around the fact that arguments were of different types depending on the user-request. With the requests split this no longer has to be done.


Is this really only about carrying them around on the call stack, or
does it extend to storage?  Do you see a new pool_cache object at some
point?

Benefits as above, I do not (at this time) envision a new pool_cache object.


What is the long-term plan (for the set of changes you are currently
envisioning)?  I would like to see that written down before we start.

Obviously, the first set of changes is to convert all uses of mbuf to use sockaddr. While not dependent on this change one potential piece of work that may follow is the merging of the inet and inet6 pcb which would remove large amounts of redundant / duplicated #ifdef'd code.


Will this extend to drivers eventually?  If so, what's the pro/con of
that gain vs the added difficulty of porting drivers/changes from the
other BSDs?

As far as I'm aware this change should not in any way leak into drivers, as for changes from other BSDs our per-user request code is already diverged as a result of the other projects making changes. For example FreeBSD has already merged their inet/inet6 pcb structure and they re-factored their per-user requests long ago.

tyler


Home | Main Index | Thread Index | Old Index