On Tue, Jun 04, 2002 at 09:47:22AM -0700, Lars Eggert wrote: > Luigi Rizzo wrote: > >>> BTW if you use polling, you have to be careful in the place > >>> where you put the call to if_tx_rdy() to make sure that it > >>> catches the tx queue becoming empty only once and not at every > >>> polling cycle. > >> > >> How about at the very end of sis_intr(), as a new "else" branch of > >> the queue length check, like this: > > > > except that sis_intr is never called when you use polling :( > > Doh. You're right, of course. > > A new "else" branch of the corresponding "if" in sis_poll() would fire > on each poll while the queue is empty, so I guess I'll put the call at > the end of the "while" loop in sis_txeof(), after the mbuf is freed.
and _if_ the mbuf is freed. In any case it is more a matter of efficiency than of correctness. Even if you call repeatedly if_tx_rdy() when the device queue is empty (and the pipe is idle, otherwise at the first occurrence it will transmit a packet making the transmit queue not empty anymore) the pipe will not 'accumulate' credits. cheers luigi To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message