From: Jakub Kicinski <kuba@kernel.org>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Tariq Toukan <tariqt@nvidia.com>, Jianbo Liu <jianbol@nvidia.com>,
<netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Mark Bloch <mbloch@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>
Subject: Re: [PATCH net 4/4] net/mlx5e: Keep netdev when leave switchdev for devlink set legacy only
Date: Fri, 20 Dec 2024 06:46:34 -0800 [thread overview]
Message-ID: <20241220064634.10b127f9@kernel.org> (raw)
In-Reply-To: <ec95c546-114d-402f-b7b9-b3e54b33dbf0@intel.com>
On Fri, 20 Dec 2024 09:48:11 +0100 Przemek Kitszel wrote:
> > mlx5_core_uplink_netdev_set(mdev, NULL);
> > mlx5e_dcbnl_delete_app(priv);
> > - unregister_netdev(priv->netdev);
> > - _mlx5e_suspend(adev, false);
> > + /* When unload driver, the netdev is in registered state
>
> /*
> * Netdev dropped the special comment allowance rule,
> * now you have to put one line almost blank at the front.
> */
Incorrect, we still prefer the old comment style, we just give a pass
now to people who have a strong preference the opposite way.
> > + * if it's from legacy mode. If from switchdev mode, it
> > + * is already unregistered before changing to NIC profile.
> > + */
> > + if (priv->netdev->reg_state == NETREG_REGISTERED) {
> > + unregister_netdev(priv->netdev);
> > + _mlx5e_suspend(adev, false);
> > + } else {
> > + struct mlx5_core_dev *pos;
> > + int i;
> > +
> > + if (test_bit(MLX5E_STATE_DESTROYING, &priv->state))
>
> you have more than one statement/expression inside the if,
> so you must wrap with braces
I'm not aware of that as a hard rule either.
next prev parent reply other threads:[~2024-12-20 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 8:15 [PATCH net 0/4] mlx5 misc fixes 2024-12-20 Tariq Toukan
2024-12-20 8:15 ` [PATCH net 1/4] net/mlx5: DR, select MSIX vector 0 for completion queue creation Tariq Toukan
2024-12-20 8:15 ` [PATCH net 2/4] net/mlx5e: macsec: Maintain TX SA from encoding_sa Tariq Toukan
2024-12-20 8:15 ` [PATCH net 3/4] net/mlx5e: Skip restore TC rules for vport rep without loaded flag Tariq Toukan
2024-12-20 8:15 ` [PATCH net 4/4] net/mlx5e: Keep netdev when leave switchdev for devlink set legacy only Tariq Toukan
2024-12-20 8:48 ` Przemek Kitszel
2024-12-20 14:46 ` Jakub Kicinski [this message]
2024-12-20 15:10 ` Przemek Kitszel
2024-12-23 19:10 ` [PATCH net 0/4] mlx5 misc fixes 2024-12-20 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=20241220064634.10b127f9@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=jianbol@nvidia.com \
--cc=leonro@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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 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.