linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Cosmin Ratiu <cratiu@nvidia.com>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"hawk@kernel.org" <hawk@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"leon@kernel.org" <leon@kernel.org>,
	"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"ast@kernel.org" <ast@kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Mark Bloch <mbloch@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>, Gal Pressman <gal@nvidia.com>
Subject: Re: [PATCH net-next 5/5] net/mlx5e: Convert mlx5 netdevs to instance locking
Date: Thu, 22 May 2025 08:28:46 -0700	[thread overview]
Message-ID: <aC9CrkOPhLBykJSp@mini-arch> (raw)
In-Reply-To: <4ced8f1c8228eeb80f78677a46c3ba7ca3de2bc3.camel@nvidia.com>

On 05/21, Cosmin Ratiu wrote:
> On Wed, 2025-05-21 at 11:27 -0700, Stanislav Fomichev wrote:
> > On 05/21, Tariq Toukan wrote:
> > 
> > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
> > > b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
> > > index 0979d672d47f..79ae3a51a4b3 100644
> > > --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
> > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
> > > @@ -32,6 +32,7 @@
> > >  
> > >  #include <rdma/ib_verbs.h>
> > >  #include <linux/mlx5/fs.h>
> > > +#include <net/netdev_lock.h>
> > >  #include "en.h"
> > >  #include "en/params.h"
> > >  #include "ipoib.h"
> > > @@ -102,6 +103,8 @@ int mlx5i_init(struct mlx5_core_dev *mdev,
> > > struct net_device *netdev)
> > >  
> > >  	netdev->netdev_ops = &mlx5i_netdev_ops;
> > >  	netdev->ethtool_ops = &mlx5i_ethtool_ops;
> > > +	netdev->request_ops_lock = true;
> > > +	netdev_lockdep_set_classes(netdev);
> > >  
> > >  	return 0;
> > >  }
> > 
> > Out of curiosity: any reason this is part of patch 5 and not patch 4?
> 
> If you're referring to enabling instance locking in
> drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c and by patch 5
> you meant patch 3, this part cannot be submitted separately from the
> other changes in this patch, as without all of the changes we'd either
> get assertion failures from missing the instance lock or deadlocks
> (e.g. from using the dev_* instead of netif_* functions).
> 
> As I tried to explain in the description, I couldn't figure out a way
> to split this change into smaller units, as the call graph looks like a
> ball of hair spit out by a cat.

SG, thanks for clarifying!

  reply	other threads:[~2025-05-22 15:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21 12:08 [PATCH net-next 0/5] net/mlx5: Convert mlx5 to netdev instance locking Tariq Toukan
2025-05-21 12:08 ` [PATCH net-next 1/5] IB/IPoIB: Enqueue separate work_structs for each flushed interface Tariq Toukan
2025-05-21 12:08 ` [PATCH net-next 2/5] IB/IPoIB: Replace vlan_rwsem with the netdev instance lock Tariq Toukan
2025-05-21 12:09 ` [PATCH net-next 3/5] IB/IPoIB: Allow using netdevs that require the " Tariq Toukan
2025-05-21 12:09 ` [PATCH net-next 4/5] net/mlx5e: Don't drop RTNL during firmware flash Tariq Toukan
2025-05-22 16:00   ` Jakub Kicinski
2025-05-21 12:09 ` [PATCH net-next 5/5] net/mlx5e: Convert mlx5 netdevs to instance locking Tariq Toukan
2025-05-21 18:27   ` Stanislav Fomichev
2025-05-21 20:37     ` Cosmin Ratiu
2025-05-22 15:28       ` Stanislav Fomichev [this message]
2025-05-22 15:51 ` [PATCH net-next 0/5] net/mlx5: Convert mlx5 to netdev " Jakub Kicinski
2025-05-22 16:10   ` Leon Romanovsky
2025-05-22 16:30 ` patchwork-bot+netdevbpf

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=aC9CrkOPhLBykJSp@mini-arch \
    --to=stfomichev@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=cratiu@nvidia.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=hawk@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).