Re: [EXT] Re: [net PATCH V2 1/4] octeontx2-pf: Update PFC configuration

From: Jakub Kicinski
Date: Fri Aug 18 2023 - 12:01:20 EST


Thanks for replying a week late, always a good use of maintainers time
to swap back all the context from random conversations!

On Fri, 18 Aug 2023 06:54:52 +0000 Suman Ghosh wrote:
> >If there is any error in open() this will silently take the interface
> >down. Can't you force a NAPI poll or some such, if the concern is a
> >missed IRQ?
> [Suman] I can check the return type of open() and report in case of
> error. But even if we force NAPI poll we might not be able to control
> the watchdog reset. If we have a running traffic and interface is up,
> when we force NAPI poll, then the new packets will have updated
> scheduler queue and we will still loose the completion interrupts of
> the previous packets.

Why does it matter that you lost an interrupt if the poll has happened.
Can you describe the problem in more detail?

> Do you see any issue if I handle the error situation during open() call?

No, for years we have been rejecting code which does this.
If the machine is under memory pressure allocating all the buffers
for rings can easily fail and make the machine drop off the network.
You either have to refuse to change this setting at runtime or
implement prepare/commit reconfiguration model like other modern
drivers, where allocations are done before the stop().