RE: [PATCH net-next v23 04/13] rtase: Implement the interrupt routine and rtase_poll

From: Justin Lai
Date: Fri Jul 12 2024 - 04:32:33 EST


> On Wed, 10 Jul 2024 11:32:25 +0800 Justin Lai wrote:
> > +#ifdef CONFIG_NET_POLL_CONTROLLER
> > +/* Polling 'interrupt' - used by things like netconsole to send skbs
> > + * without having to re-enable interrupts. It's not called while
> > + * the interrupt routine is executing.
> > + */
> > +static void rtase_netpoll(struct net_device *dev) {
> > + const struct rtase_private *tp = netdev_priv(dev);
> > + const struct pci_dev *pdev = tp->pdev;
> > +
> > + disable_irq(pdev->irq);
> > + rtase_interrupt(pdev->irq, dev);
>
> Why do you need to implement a separate netpoll handler?
> netpoll is optional, if driver doesn't implement it core will just core your NAPI
> handlers with a budget of 0 (to only clean up Tx, see NAPI documentation).
>
> disable_irq() sleeps, you most definitely can't call it here.
> --
> pw-bot: cr

Hi Jakub,

After confirming, I think there is no need to implement the netpoll handler,
so I will remove it.