wendy wrote:
You mean the free buffer routine of [b]desballoc[/b] is always called before gld_recv( )
or mac_rx( ) exit? If something goes wrong, like the "Ping got stuck" issue
that we discussed last week happens and packets got buffered in system until name service
timeout, can the free buffer routine be called before gld_recv( ) or mac_rx( ) exit? If
so, then I think we do not need a free rx buffer list since the rx buffer is always
freed after sending packet upstream and we can re-use it.
It's not true. In fact, the driver should not expect the time the buffer
will be freed, so a free buffer list is needed to recycle those released
buffers from upper layers. It's also possible some upper layer module
will hold the buffer for a long time without releasing.
Before the callback function, frtn_t, is called, the driver should not
care about who is holding this buffer and when it will be freed. But
driver need to keep some DMA buffers to avoid the situation that all
buffers are hold by upper layer. There were many related discussions on
Device Driver Community, you may find useful information there or you
may look into other drivers to know the implementation.
Thanks,
Roamer
--
# telnet (650)-786-6759 (x86759)
Connected to Solaris.Sun.COM.
login: Lu, Yunsong
Last login: January 2, 2007 from beyond.sfbay
[EMAIL PROTECTED] v1.03 Since Mon Dec. 22, 2003
[EMAIL PROTECTED] Networking]# cd ..
_______________________________________________
networking-discuss mailing list
[email protected]