[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250306195354.GG354403@ziepe.ca>
Date: Thu, 6 Mar 2025 15:53:54 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: longli@...uxonhyperv.com
Cc: Leon Romanovsky <leon@...nel.org>,
Konstantin Taranov <kotaranov@...rosoft.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hyperv@...r.kernel.org,
Long Li <longli@...rosoft.com>
Subject: Re: [patch rdma-next v5 2/2] RDMA/mana_ib: Handle net event for
pointing to the current netdev
On Thu, Mar 06, 2025 at 11:24:39AM -0800, longli@...uxonhyperv.com wrote:
> + switch (event) {
> + case NETDEV_CHANGEUPPER:
> + ndev = mana_get_primary_netdev(mc, 0, &dev->dev_tracker);
> + /*
> + * RDMA core will setup GID based on updated netdev.
> + * It's not possible to race with the core as rtnl lock is being
> + * held.
> + */
> + ib_device_set_netdev(&dev->ib_dev, ndev, 1);
> +
> + /* mana_get_primary_netdev() returns ndev with refcount held */
> + netdev_put(ndev, &dev->dev_tracker);
? What is the point of a tracker in dev if it never lasts outside this
scope?
ib_device_set_netdev() already has a tracker built into it.
Jason
Powered by blists - more mailing lists