Thread (6 messages) read the whole thread 6 messages, 4 authors, 2025-11-03

Re: [PATCH net] net: gro_cells: Use nested-BH locking for gro_cell

From: Eric Dumazet <edumazet@google.com>
Date: 2025-11-03 15:26:53
Also in: linux-rt-devel

On Mon, Nov 3, 2025 at 5:59 AM Sebastian Andrzej Siewior
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
On 2025-11-03 04:36:45 [-0800], Eric Dumazet wrote:
quoted
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);

quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help