Re: [net-next v3 05/15] net: cavium/liquidio: Convert tasklet API to new bottom half workqueue mechanism
From: Allen
Date: Thu Aug 01 2024 - 18:00:47 EST
Jakub,
> > - tasklet_enable(&oct_priv->droq_tasklet);
> > + enable_and_queue_work(system_bh_wq, &oct_priv->droq_bh_work);
> >
> > if (atomic_read(&lio->ifstate) & LIO_IFSTATE_REGISTERED)
> > unregister_netdev(netdev);
>
> > if (OCTEON_CN23XX_PF(oct))
> > oct->droq[0]->ops.poll_mode = 0;
> >
> > - tasklet_enable(&oct_priv->droq_tasklet);
> > + enable_and_queue_work(system_bh_wq, &oct_priv->droq_bh_work);
>
> Could you shed some light in the cover letter or this patch why
> tasklet_enable() is converted to enable_and_queue_work() at
> the face of it those two do not appear to do the same thing?
With the transition to workqueues, the implementation on the workqueue side is:
tasklet_enable() -> enable_work() + queue_work()
Ref: https://lore.kernel.org/all/20240227172852.2386358-7-tj@xxxxxxxxxx/
enable_and_queue_work() is a helper which combines the two calls.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474a549ff4c989427a14fdab851e562c8a63fe24
Hope this answers your question.
Thanks,
Allen
>
> I'll apply patches 1-4 already.