[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0Uc5ggH24LuKCbSTubDSiTnD5UsLbrC5G6C73rj7ZEnTYQ@mail.gmail.com>
Date: Sun, 21 Nov 2021 13:16:33 -0800
From: Alexander Duyck <alexander.duyck@...il.com>
To: Danielle Ratson <danieller@...dia.com>
Cc: Jesse Brandeburg <jesse.brandeburg@...el.com>,
Oleksandr Natalenko <oleksandr@...alenko.name>,
Jakub Kicinski <kuba@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"David S. Miller" <davem@...emloft.net>,
intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [igb] netconsole triggers warning in netpoll_poll_dev
On Sun, Nov 21, 2021 at 3:44 AM Danielle Ratson <danieller@...dia.com> wrote:
>
> > > > > drivers/net/ethernet/intel/igb/igb_main.c | 12 ++++++++----
> > > > > 1 file changed, 8 insertions(+), 4 deletions(-)
> > > > >
> > > > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
> > > > > b/drivers/net/ethernet/intel/igb/igb_main.c
> > > > > index 0cd37ad81b4e..b0a9bed14071 100644
> > > > > --- a/drivers/net/ethernet/intel/igb/igb_main.c
> > > > > +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> > > > > @@ -7991,12 +7991,16 @@ static void igb_ring_irq_enable(struct
> > > > igb_q_vector *q_vector)
> > > > > **/
> > > > > static int igb_poll(struct napi_struct *napi, int budget) {
> > > > > - struct igb_q_vector *q_vector = container_of(napi,
> > > > > - struct igb_q_vector,
> > > > > - napi);
> > > > > - bool clean_complete = true;
> > > > > + struct igb_q_vector *q_vector;
> > > > > + bool clean_complete;
> > > > > int work_done = 0;
> > > > >
> > > > > + /* if budget is zero, we have a special case for netconsole, so
> > > > > + * make sure to set clean_complete to false in that case.
> > > > > + */
> > > > > + clean_complete = !!budget;
> > > > > +
> > > > > + q_vector = container_of(napi, struct igb_q_vector, napi);
> > > > > #ifdef CONFIG_IGB_DCA
> > > > > if (q_vector->adapter->flags & IGB_FLAG_DCA_ENABLED)
> > > > > igb_update_dca(q_vector);
> > > >
> > > > I'm not a big fan of moving the q_vector init as a part of this
> > > > patch since it just means more backport work.
> > > >
> > > > That said the change itself should be harmless so I am good with it
> > > > either way.
> > > >
> > > > Reviewed-by: Alexander Duyck <alexanderduyck@...com>
> > >
> > > Hi,
> > >
> > > I have lately added the netconsole module, and since then we see the
> > same warning constantly in the logs.
> > > I have tried to apply Jesse's patch but it didn't seem to solve the issue.
> > >
> > > Did anyone managed to solve the issue and can share with us?
> > >
> > > Thanks,
> > > Danielle
> >
> > The one issue I can see is that it basically leaves the igb_poll call stuck in
> > polling mode.
> >
> > The easiest fix for all of this in the in-kernel driver is to just get rid of the
> > "min" at the end and instead just "return work_done;". The extra
> > complication is only needed if you were to be polling multiple queues and
> > that isn't the case here so we should simplify it and get rid of the buggy
> > "budget - 1" return value.
>
> Thank you very much for your reply Alexander!
> It seems to work well!
>
> Are you planning to send it upstream?
No, I was just suggesting it as a possible solution. Feel free to put
together your own patch and submit it if it is working for you.
- Alex
Powered by blists - more mailing lists