All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Long Li <longli@microsoft.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	"longli@linuxonhyperv.com" <longli@linuxonhyperv.com>,
	Konstantin Taranov <kotaranov@microsoft.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>
Subject: Re: [EXTERNAL] Re: [patch rdma-next v5 2/2] RDMA/mana_ib: Handle net event for pointing to the current netdev
Date: Wed, 12 Mar 2025 15:38:04 +0200	[thread overview]
Message-ID: <20250312133804.GC1322339@unreal> (raw)
In-Reply-To: <SA6PR21MB42316CA1E7C6CF083A89ECE4CED62@SA6PR21MB4231.namprd21.prod.outlook.com>

On Mon, Mar 10, 2025 at 09:46:08PM +0000, Long Li wrote:
> > Subject: RE: [EXTERNAL] Re: [patch rdma-next v5 2/2] RDMA/mana_ib:
> > Handle net event for pointing to the current netdev
> > 
> > > Subject: [EXTERNAL] 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@linuxonhyperv.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
> > 
> > I was asked to use a tracker for netdev_hold()/netdev_put(). But this code
> > (and the code in mana_ib_probe() of the 1st patch) is simple enough that
> > everything is done in one scope.
> > 
> > Jakub, do you think it's okay to use NULL as the tracker in both patches?
> > 
> > Long
> 
> Hi, 
> 
> If we don't want to use a tracker, can we take the v4 version of the patch set?
> 
> Otherwise, please take v5 (this patch) if a tracker is required.

Let's use v5 version as it is more complete variant, however the series
needs to be rebased as it doesn't apply after Konstantin's changes.

Thanks

> 
> Thanks,
> Long

  reply	other threads:[~2025-03-12 13:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 19:24 [patch rdma-next v5 1/2] net: mana: Change the function signature of mana_get_primary_netdev_rcu longli
2025-03-06 19:24 ` [patch rdma-next v5 2/2] RDMA/mana_ib: Handle net event for pointing to the current netdev longli
2025-03-06 19:53   ` Jason Gunthorpe
2025-03-06 20:01     ` [EXTERNAL] " Long Li
2025-03-10 21:46       ` Long Li
2025-03-12 13:38         ` Leon Romanovsky [this message]
2025-03-12 23:16           ` Long Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250312133804.GC1322339@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jgg@ziepe.ca \
    --cc=kotaranov@microsoft.com \
    --cc=kuba@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@linuxonhyperv.com \
    --cc=longli@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.