Thread (16 messages) flat view 16 messages, 5 authors, 2023-09-20

Re: [RFC PATCH v3 net-next 6/7] net: ethtool: add a mutex protecting RSS contexts

From: Edward Cree <ecree.xilinx@gmail.com>
Date: 2023-09-13 11:24:26

On 12/09/2023 17:40, Russell King (Oracle) wrote:
On Tue, Sep 12, 2023 at 03:21:41PM +0100, edward.cree@amd.com wrote:
quoted
diff --git a/net/core/dev.c b/net/core/dev.c
index f12767466427..2acb4d8cd4c7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -10054,6 +10054,7 @@ int register_netdevice(struct net_device *dev)
 	idr_init_base(&dev->ethtool->rss_ctx, 1);
 
 	spin_lock_init(&dev->addr_list_lock);
+	mutex_init(&dev->ethtool->rss_lock);
Is there a reason to split this from the idr (eventually xarray)
initialisation above? Surely initialisations for a feature (rss)
should all be grouped together?
No real reason; I just thought "put locks together" made sense, but
 I guess "put rss stuff together" makes more, can change it.

-e
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help