Strange logic in r336438
Hans Petter Selasky
hps at selasky.org
Fri Jan 17 09:46:16 UTC 2020
On 2020-01-17 00:31, Eric van Gyzen wrote:
> I was just reviewing r336438:
>
> https://svnweb.freebsd.org/base?view=revision&revision=336438
>
> In bxe_interrupt_detach(), the nested loops over sc->num_queues don't
> look right. We drain the taskqueues for queue 0, but then free the
> taskqueues for queues 1-N without draining them. Should the second loop
> come _after_ the first loop, instead of _in_ it?
>
Hi,
taskqueue_free() will do some kind of last minute draining, if you look
at the implementation.
However if you want to ensure all tasks are completed, taskqueue_drain()
before free() is preferred.
--HPS
More information about the freebsd-net
mailing list