[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200310140951.64a3a7dc@kicinski-fedora-PC1C0HJN>
Date: Tue, 10 Mar 2020 14:09:51 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: Saeed Mahameed <saeedm@...lanox.com>,
"jonathan.lemon@...il.com" <jonathan.lemon@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kernel-team@...com" <kernel-team@...com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"ilias.apalodimas@...aro.org" <ilias.apalodimas@...aro.org>,
Li RongQing <lirongqing@...du.com>
Subject: Re: [PATCH] page_pool: use irqsave/irqrestore to protect ring
access.
On Tue, 10 Mar 2020 11:04:12 +0100 Jesper Dangaard Brouer wrote:
> On Tue, 10 Mar 2020 02:30:34 +0000
> Saeed Mahameed <saeedm@...lanox.com> wrote:
> > On Mon, 2020-03-09 at 17:55 -0700, David Miller wrote:
> > > From: Jonathan Lemon <jonathan.lemon@...il.com>
> > > Date: Mon, 9 Mar 2020 12:49:29 -0700
> > >
> > > > netpoll may be called from IRQ context, which may access the
> > > > page pool ring. The current _bh variants do not provide sufficient
> > > > protection, so use irqsave/restore instead.
> > > >
> > > > Error observed on a modified mlx4 driver, but the code path exists
> > > > for any driver which calls page_pool_recycle from napi poll.
>
> Netpoll calls into drivers are problematic, nasty and annoying. Drivers
> usually catch netpoll calls via seeing NAPI budget is zero, and handle
> the situation inside the driver e.g.[1][2]. (even napi_consume_skb
> catch it this way).
I'm probably just repeating what you said, but would it be reasonable
to expect page_pool users to special-case XDP rings to not be cleaned?
netpoll has no use for them.
Perhaps that would not solve the issue for those funky drivers which
use the same rings for both XDP and the stack. Sigh. Do we care about
them?
Powered by blists - more mailing lists