On 16/05/07, Tom Chen <[EMAIL PROTECTED]> wrote:
If a packet is saved in two mblk_t* structure, mp1 and mp2. If I use [b]linkb[/b][b](mp1,mp2)[/b] to link them together, and then use [b]gld_recv( mp1)[/b] to send the packet to OS, OS can recognize this packet. I think both buffers should be returned later from OS afterwards. However, i find only mp2 or mp1 buffer is returned back to driver. Is there any way to make OS return all linked mblk_t buffers?
The OS should return the buffers. Are mp1 and mp2 both created using desballoc()? The frtn_t->free_func is called whenever the ref. count on the dblk of a desbcalloc-ed buffer reaches zero during a freeb(). If a desballoc-ed buffer is bot being returned then it implies it is not being freed. If this is the case then, if you run with kmem_flags set to 0xf then you should be able to spot the leak using ::findleaks from mdb run on a core dump of your system. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant _______________________________________________ networking-discuss mailing list [email protected]
