Thread (8 messages) 8 messages, 4 authors, 2025-03-05

Re: [Patch rdma-next] RDMA/mana_ib: handle net event for pointing to the current netdev

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2025-03-01 00:26:06
Also in: linux-hyperv, linux-rdma, lkml

On Fri, Feb 28, 2025 at 02:41:59PM -0800, longli@linuxonhyperv.com wrote:
+	struct mana_ib_dev *dev = container_of(this, struct mana_ib_dev, nb);
+	struct net_device *event_dev = netdev_notifier_info_to_dev(ptr);
+	struct gdma_context *gc = dev->gdma_dev->gdma_context;
+	struct mana_context *mc = gc->mana.driver_data;
+	struct net_device *ndev;
+
+	if (event_dev != mc->ports[0])
+		return NOTIFY_DONE;
+
+	switch (event) {
+	case NETDEV_CHANGEUPPER:
+		rcu_read_lock();
+		ndev = mana_get_primary_netdev_rcu(mc, 0);
+		rcu_read_unlock();
That locking sure looks weird/wrong.

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