Thread (6 messages) 6 messages, 4 authors, 2025-11-03

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

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2025-11-03 13:59:20
Also in: linux-rt-devel
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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.

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