From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5D17C433EF for ; Sun, 10 Jul 2022 09:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229625AbiGJJAS (ORCPT ); Sun, 10 Jul 2022 05:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiGJJAR (ORCPT ); Sun, 10 Jul 2022 05:00:17 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46BEA11A18; Sun, 10 Jul 2022 02:00:17 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A72D55C00D5; Sun, 10 Jul 2022 05:00:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 10 Jul 2022 05:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1657443616; x=1657530016; bh=FuH+7xDCBPPGGPgblHUmZHZZT8Lo ZV54xq/hlaP9zuk=; b=ZwFdihFDwFWT52Z+xMrCwILk2r9H5a1IF+CrInbmw4uv otrpDIsjKctIa1zFFfPJOAgbf+2a3Fq/GDePfAryXvPsezoS5mpkf6Yea8b+NBYQ 4XoZ1bUor/6r/6DZa/SK+JW3O386fSdfqiE8XLtCdts8m1yQbhgAHdZqTUwJHYSt rGhkNk6of8466FXBrYUl/r1A8ITDrLcG2mlm5Em6LzWGq5H9dcTHXmlcQn9iWm5f A8LoVgQAJyFTuzv/JPcOwe4puFlGtVplQ1kEiGoviKp1WRxO5liGIHrMReqpN+rK k2Xhq3DSPJgKRUZr8oiIp2mDaRIZ9JAGSzDT8Rt7lQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejuddguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihgu ohhstghhrdhorhhgqeenucggtffrrghtthgvrhhnpedvudefveekheeugeeftddvveefgf duieefudeifefgleekheegleegjeejgeeghfenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 10 Jul 2022 05:00:15 -0400 (EDT) Date: Sun, 10 Jul 2022 12:00:13 +0300 From: Ido Schimmel To: Jakub Kicinski , vikas.gupta@broadcom.com Cc: jiri@nvidia.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, dsahern@kernel.org, stephen@networkplumber.org, edumazet@google.com, pabeni@redhat.com, ast@kernel.org, leon@kernel.org, linux-doc@vger.kernel.org, corbet@lwn.net, michael.chan@broadcom.com, andrew.gospodarek@broadcom.com Subject: Re: [PATCH net-next v2 1/3] devlink: introduce framework for selftests Message-ID: References: <20220628164241.44360-1-vikas.gupta@broadcom.com> <20220707182950.29348-1-vikas.gupta@broadcom.com> <20220707182950.29348-2-vikas.gupta@broadcom.com> <20220707182022.78d750a7@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220707182022.78d750a7@kernel.org> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jul 07, 2022 at 06:20:22PM -0700, Jakub Kicinski wrote: > On Thu, 7 Jul 2022 23:59:48 +0530 Vikas Gupta wrote: > > static const struct genl_small_ops devlink_nl_ops[] = { > > @@ -9361,6 +9493,18 @@ static const struct genl_small_ops devlink_nl_ops[] = { > > .doit = devlink_nl_cmd_trap_policer_set_doit, > > .flags = GENL_ADMIN_PERM, > > }, > > + { > > + .cmd = DEVLINK_CMD_SELFTESTS_SHOW, > > + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, > > I think we can validate strict for new commands, so no validation flags > needed. > > > + .doit = devlink_nl_cmd_selftests_show, > > What about dump? Listing all tests on all devices? > > > + .flags = GENL_ADMIN_PERM, Related to Jakub's question, is there a reason that the show command requires 'GENL_ADMIN_PERM' ? > > + }, > > + { > > + .cmd = DEVLINK_CMD_SELFTESTS_RUN, > > + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, > > + .doit = devlink_nl_cmd_selftests_run, > > + .flags = GENL_ADMIN_PERM, > > + }, > > }; > > > > static struct genl_family devlink_nl_family __ro_after_init = { >