[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iJaf3qwTL82qJyDx1_Eq0RAQuprdy7CyiRd8YWoXD=Vzg@mail.gmail.com>
Date: Mon, 3 Nov 2025 07:26:40 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Gal Pressman <gal@...dia.com>, netdev@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>, syzbot+8715dd783e9b0bef43b1@...kaller.appspotmail.com
Subject: Re: [PATCH net] net: gro_cells: Use nested-BH locking for gro_cell
On Mon, Nov 3, 2025 at 5:59 AM Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
>
> On 2025-11-03 04:36:45 [-0800], Eric Dumazet wrote:
> > Adding LOCKDEP annotations would be needed (like what we do in
> > netdev_lockdep_set_classes()
>
> You mean something like
>
> diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
> index 596688b67a2a8..1df6448701879 100644
> --- a/include/net/gro_cells.h
> +++ b/include/net/gro_cells.h
> @@ -10,6 +10,7 @@ struct gro_cell;
>
> struct gro_cells {
> struct gro_cell __percpu *cells;
> + struct lock_class_key cells_bh_class;
> };
>
> int gro_cells_receive(struct gro_cells *gcells, struct sk_buff *skb);
> diff --git a/net/core/gro_cells.c b/net/core/gro_cells.c
> index fd57b845de333..1c98d32657e85 100644
> --- a/net/core/gro_cells.c
> +++ b/net/core/gro_cells.c
> @@ -88,6 +88,7 @@ int gro_cells_init(struct gro_cells *gcells, struct net_device *dev)
>
> __skb_queue_head_init(&cell->napi_skbs);
> local_lock_init(&cell->bh_lock);
> + lockdep_set_class(&cell->bh_lock, &gcells->cells_bh_class);
>
> set_bit(NAPI_STATE_NO_BUSY_POLL, &cell->napi.state);
>
>
> > Or I would try something like :
>
> I'm fine with both. I can provide a patch body for either of the two.
>
LOCKDEP annotations should be fine, thank you !
> Sebastian
Powered by blists - more mailing lists