From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net-next 08/13] devlink: don't take instance lock around eswitch mode set Date: Mon, 21 May 2018 22:12:50 -0700 Message-ID: <20180522051255.9438-9-jakub.kicinski@netronome.com> References: <20180522051255.9438-1-jakub.kicinski@netronome.com> Cc: netdev@vger.kernel.org, oss-drivers@netronome.com, Jakub Kicinski , jiri@resnulli.us To: davem@davemloft.net Return-path: Received: from mail-qk0-f194.google.com ([209.85.220.194]:40508 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751411AbeEVFNp (ORCPT ); Tue, 22 May 2018 01:13:45 -0400 Received: by mail-qk0-f194.google.com with SMTP id r139-v6so1441058qke.7 for ; Mon, 21 May 2018 22:13:44 -0700 (PDT) In-Reply-To: <20180522051255.9438-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: Changing switch mode may want to register and unregister devlink ports. Therefore similarly to DEVLINK_CMD_PORT_SPLIT/UNSPLIT it should not take the instance lock. Drivers don't depend on existing locking since it's a very recent addition. Signed-off-by: Jakub Kicinski --- CC: jiri@resnulli.us net/core/devlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index 5c8a40e1a01e..475246b355f0 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -2756,7 +2756,8 @@ static const struct genl_ops devlink_nl_ops[] = { .doit = devlink_nl_cmd_eswitch_set_doit, .policy = devlink_nl_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK, + .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK | + DEVLINK_NL_FLAG_NO_LOCK, }, { .cmd = DEVLINK_CMD_DPIPE_TABLE_GET, -- 2.17.0