Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2264886imw; Sun, 10 Jul 2022 02:01:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tX2oCppt41gzc5dDa9Gh0KcneVVMKI8Ilh16Jy0ZOwwjMdFNJZJQz+Q2z1rjKziBfPRB+N X-Received: by 2002:a05:6a00:2449:b0:528:3a29:e79d with SMTP id d9-20020a056a00244900b005283a29e79dmr12775059pfj.39.1657443705967; Sun, 10 Jul 2022 02:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657443705; cv=none; d=google.com; s=arc-20160816; b=Gm4pZPHP+w8m90MWCFWUXvXD9ZUxXJvPhpzwuUFjtmJqjIGXQYr2zdRSGGjfpqL/OZ VRF5WcXNqJnrDLl8hSWlQAJicwyBaFBxCGFJpJqxUp5cWg2GJTwXiGt8tftd5GsR/Uv2 XcNXCcChJ7d6oBxEqbMMJZz1CEqrCx00Y6EVSM0/wIVTkR2aYKl4BjX3BVzL1a3+p3IR PzO9Q2m/noQJVUfGAF/P51arKeLhzXv6TQgV/w6FCaDm9PFfnmK7X9vJEfEL0IkVYGTE 5onmm3tTLfSbcGa3XL0NAfkxqIRem0pvZGw5JT8oSAFOS4bu2BeYBNrua8D+r5wFivjO sc2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=FuH+7xDCBPPGGPgblHUmZHZZT8LoZV54xq/hlaP9zuk=; b=HHXO5Khrs0306g8iKH9BA1MDQRTAaOpBzZcEsYF2bXjiT7EMrgE8Vz/2A9nTLJ0U3X +dypn7v9D7YNFn0H1Ne6r+2Ys7O2P4IKNs7jFjLUfMhpcRRgZ8HAxk7B0uD6K//Qsg2Q 2cnC7XhvvOPJEq87T45NFGADL6V0DoJhkfCxH+9ix3Elc2rFbYC1z3tbdNGFwd0mPCS8 ZlTGUb02XQHWECVmCwi/KMDrXjT6LgPRvVgxcz6MbOHx9PNh5FYJ7spQZ6c0Iu2OsdSn niFL3WaPPa1sWp9xrF3Mki0CumApqC6MS4/Q9SiDybxURKxYh0o8RD7eXJrxccso8fKj II7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ZwFdihFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902c40c00b0016bec53a672si7286725plk.477.2022.07.10.02.01.29; Sun, 10 Jul 2022 02:01:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ZwFdihFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbiGJJAT (ORCPT + 99 others); Sun, 10 Jul 2022 05:00:19 -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> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 = { >