diff mbox series

[net-next,4/4] net: devlink: enable parallel ops on netlink interface

Message ID 20220729071038.983101-5-jiri@resnulli.us (mailing list archive)
State Accepted
Commit 09b278462f16569c63dd78ffa29bbfe048b4e604
Delegated to: Netdev Maintainers
Headers show
Series net: devlink: allow parallel commands on multiple devlinks | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 5 this patch: 5
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jiri Pirko July 29, 2022, 7:10 a.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

As the devlink_mutex was removed and all devlink instances are protected
individually by devlink->lock mutex, allow the netlink ops to run
in parallel and therefore allow user to execute commands on multiple
devlink instances simultaneously.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
 net/core/devlink.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Aug. 20, 2022, 7:44 p.m. UTC | #1
On Fri, 29 Jul 2022 09:10:38 +0200 Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> As the devlink_mutex was removed and all devlink instances are protected
> individually by devlink->lock mutex, allow the netlink ops to run
> in parallel and therefore allow user to execute commands on multiple
> devlink instances simultaneously.

Could you update the "Locking" section of
Documentation/networking/devlink/index.rst
with the full info and recommendations?
Jiri Pirko Aug. 22, 2022, 12:26 p.m. UTC | #2
Sat, Aug 20, 2022 at 09:44:59PM CEST, kuba@kernel.org wrote:
>On Fri, 29 Jul 2022 09:10:38 +0200 Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>> 
>> As the devlink_mutex was removed and all devlink instances are protected
>> individually by devlink->lock mutex, allow the netlink ops to run
>> in parallel and therefore allow user to execute commands on multiple
>> devlink instances simultaneously.
>
>Could you update the "Locking" section of
>Documentation/networking/devlink/index.rst
>with the full info and recommendations?

Will do.
diff mbox series

Patch

diff --git a/net/core/devlink.c b/net/core/devlink.c
index 06cd7c1a1f0a..889e7e3d3e8a 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -9505,6 +9505,7 @@  static struct genl_family devlink_nl_family __ro_after_init = {
 	.maxattr	= DEVLINK_ATTR_MAX,
 	.policy = devlink_nl_policy,
 	.netnsok	= true,
+	.parallel_ops	= true,
 	.pre_doit	= devlink_nl_pre_doit,
 	.post_doit	= devlink_nl_post_doit,
 	.module		= THIS_MODULE,