From: Simon Horman <horms@kernel.org>
To: Petr Machata <petrm@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Ido Schimmel <idosch@nvidia.com>,
Amit Cohen <amcohen@nvidia.com>,
mlxsw@nvidia.com, Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net-next 04/14] devlink: Allow taking device lock in pre_doit operations
Date: Fri, 17 Nov 2023 15:23:48 +0000 [thread overview]
Message-ID: <20231117152348.GD164483@vergenet.net> (raw)
In-Reply-To: <ecb76739d85bb0cb2977520c17c9af31a6228abe.1700047319.git.petrm@nvidia.com>
On Wed, Nov 15, 2023 at 01:17:13PM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> Introduce a new private flag ('DEVLINK_NL_FLAG_NEED_DEV_LOCK') to allow
> netlink commands to specify that they need to acquire the device lock in
> their pre_doit operation and release it in their post_doit operation.
>
> The reload command will use this flag in the subsequent patch.
>
> No functional changes intended.
>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
...
> @@ -93,11 +95,13 @@ devlink_get_from_attrs_lock(struct net *net, struct nlattr **attrs)
> static int __devlink_nl_pre_doit(struct sk_buff *skb, struct genl_info *info,
> u8 flags)
> {
> + bool dev_lock = flags & DEVLINK_NL_FLAG_NEED_DEV_LOCK;
nit: I would have expressed the above as follows, to convert
the integer to a bool. But I understand that it makes
no difference in this case so there is no need to update the
patch for this:
bool dev_lock = !!(flags & DEVLINK_NL_FLAG_NEED_DEV_LOCK);
...
next prev parent reply other threads:[~2023-11-17 15:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 12:17 [PATCH net-next 00/14] mlxsw: Add support for new reset flow Petr Machata
2023-11-15 12:17 ` [PATCH net-next 01/14] devlink: Move private netlink flags to C file Petr Machata
2023-11-17 15:24 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 02/14] devlink: Acquire device lock during netns dismantle Petr Machata
2023-11-17 15:49 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 03/14] devlink: Enable the use of private flags in post_doit operations Petr Machata
2023-11-17 15:49 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 04/14] devlink: Allow taking device lock in pre_doit operations Petr Machata
2023-11-17 15:23 ` Simon Horman [this message]
2023-11-15 12:17 ` [PATCH net-next 05/14] devlink: Acquire device lock during reload command Petr Machata
2023-11-17 15:51 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 06/14] devlink: Add device lock assert in reload operation Petr Machata
2023-11-17 15:51 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 07/14] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Petr Machata
2023-11-17 15:21 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 08/14] PCI: Add debug print for device ready delay Petr Machata
2023-11-17 15:23 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 09/14] mlxsw: Extend MRSR pack() function to support new commands Petr Machata
2023-11-17 15:51 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 10/14] mlxsw: pci: Rename mlxsw_pci_sw_reset() Petr Machata
2023-11-17 15:53 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 11/14] mlxsw: pci: Move software reset code to a separate function Petr Machata
2023-11-17 15:53 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 12/14] mlxsw: pci: Add support for new reset flow Petr Machata
2023-11-17 15:53 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 13/14] mlxsw: pci: Implement PCI reset handlers Petr Machata
2023-11-17 15:54 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 14/14] selftests: mlxsw: Add PCI reset test Petr Machata
2023-11-17 15:21 ` Simon Horman
2023-11-18 17:40 ` [PATCH net-next 00/14] mlxsw: Add support for new reset flow 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=20231117152348.GD164483@vergenet.net \
--to=horms@kernel.org \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@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).