> > That may guarantee that the mblk_t is valid, but it's unclear to me how > > the information in that mblk_t can be safely used by the driver, given > > that it reflects the processing state (via b_rptr and b_wptr) of some > > random mblk_t pointing at the given dblk_t. > > That's really an implementation detail. My implementation resets the > mblk_t fields to the same state the original mblk_t fields were in after > xesballoc() was called before calling frtn_t.free_func(). I've posted a > webrev at http://cr.opensolaris.org/~pdurrant/stream.
Is there anything else that could meaningfully be done with mblk_t data? If not, could we just document that the STREAMS framework will reset the attached mblk to a pristine state prior to invoking free_func(), and save the driver from rummaging around in private fields? -- meem