On 4/11/07, Tom Chen <[EMAIL PROTECTED]> wrote:
I noticed that many times, the free buffer routine is called after gld-recv exit.
Indeed. When processing TCP traffic you'll typically see some traffic freed in the context of the thread passing it up the stack (e.g. ACKs) and some freed in the context of an application thread (e.g. the one calling read()). The issue is that the application may call read at any time so your buffer may not be freed back to the driver for a long time, and crucially your buffer may not have been freed back to the driver before detach(9e) is called. You *must* therefore keep track of buffers that have been 'loaned' up the stack and fail your detach() or _fini() entry point (whichever is most appropriate to your allocation strategy) until all buffers have been returned. Paul -- Paul Durrant http://www.linkedin.com/in/pdurrant _______________________________________________ networking-discuss mailing list [EMAIL PROTECTED]
