[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ced8f1c8228eeb80f78677a46c3ba7ca3de2bc3.camel@nvidia.com>
Date: Wed, 21 May 2025 20:37:06 +0000
From: Cosmin Ratiu <cratiu@...dia.com>
To: Tariq Toukan <tariqt@...dia.com>, "stfomichev@...il.com"
<stfomichev@...il.com>
CC: "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "hawk@...nel.org"
<hawk@...nel.org>, "davem@...emloft.net" <davem@...emloft.net>,
"leon@...nel.org" <leon@...nel.org>, "john.fastabend@...il.com"
<john.fastabend@...il.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "edumazet@...gle.com" <edumazet@...gle.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"richardcochran@...il.com" <richardcochran@...il.com>, "pabeni@...hat.com"
<pabeni@...hat.com>, "ast@...nel.org" <ast@...nel.org>, "kuba@...nel.org"
<kuba@...nel.org>, "daniel@...earbox.net" <daniel@...earbox.net>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>, Saeed Mahameed
<saeedm@...dia.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, Mark
Bloch <mbloch@...dia.com>, Moshe Shemesh <moshe@...dia.com>, "jgg@...pe.ca"
<jgg@...pe.ca>, Gal Pressman <gal@...dia.com>
Subject: Re: [PATCH net-next 5/5] net/mlx5e: Convert mlx5 netdevs to instance
locking
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.
Cosmin.
Powered by blists - more mailing lists