Darren Reed wrote:
Erik,
In the design document, is the following:
"[If Volo could pass down the size of the message to the sendmsg
function we could avoid msgdsize() all together.]"
Given the [], I'm not sure if this is an editorial mistake or not, but
something that has been brought up a few times is expanding the mblk_t
(or dblk_t?) to store a packet length and other useful information.
Whilst the mblk_t is currently a nice multiple of system word size (and
in some cases cache line size as well), micro-optimisation shouldn't be
a design goal. With the above comment and the IP Refactoring project
almost behind you now, what are your thoughts on allowing for this type
of change?
What I had in mind with the above comment was a procedure argument to
the sd_sendmsg() downcall function pointer that would specify the
length. sockfs knows how much it copied in, hence there is no need to
hide that in an mblk/dblk.
I actually think it would be harmful to extend the mblk/dblk with
redundant information; the length is already in b_wptr-b_rptr.
The problem would be that existing streams modules that adjust wptr or
rptr would not adjust some new length field.
Hence you couldn't actually trust such a length field in the general
case, which makes for more complexity and opportunity for errors.
Erik
_______________________________________________
networking-discuss mailing list
[email protected]