Re: [net-next PATCH 1/3] net: introduce napi_is_scheduled helper
From: Christian Marangi
Date: Mon Oct 02 2023 - 08:43:57 EST
On Mon, Oct 02, 2023 at 02:35:22PM +0200, Eric Dumazet wrote:
> On Mon, Oct 2, 2023 at 2:29 PM Christian Marangi <ansuelsmth@xxxxxxxxx> wrote:
>
> > Ehhh the idea here was to reduce code duplication since the very same
> > test will be done in stmmac. So I guess this code cleanup is a NACK and
> > I have to duplicate the test in the stmmac driver.
>
> I simply wanted to add a comment in front of this function/helper,
> advising not using it unless absolutely needed.
>
> Thus my question "In which context is it safe to call this helper ?"
>
> As long as it was private with a driver, I did not mind.
>
> But if made public in include/linux/netdevice.h, I would rather not
> have to explain
> to future users why it can be problematic.
Oh ok!
We have plenty of case similar to this. (example some clock API very
internal that should not be used normally or regmap related)
I will include some comments warning that this should not be used in
normal circumstances and other warnings. If you have suggestion on what
to add feel free to write them.
Any clue on how to proceed with the sge driver?
--
Ansuel