Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp385972rdb; Thu, 5 Oct 2023 08:40:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7fWNsc5d5GBpBdUly7bou2N0CmFBswWR9pgICMLPU63iDONLc+kAuFM1eKpn5gy/w/wQz X-Received: by 2002:a05:6a20:7f83:b0:15e:b8a1:57b9 with SMTP id d3-20020a056a207f8300b0015eb8a157b9mr7168772pzj.24.1696520458130; Thu, 05 Oct 2023 08:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696520458; cv=none; d=google.com; s=arc-20160816; b=yh5hxL+Rby/Z+XSeW0e8/jtrjhKPepzi4jOOwv/ihYwdUyKlyy5Hle4MUxDtfAvlOd k5JdXnf77Cwy4xF2HC15+8dKF2F5xNDVZ8FO+LkKcoxm9raPB114B+Od0/xaKSjR75ia MqLC8oTltqNQGOj3d88fHmjfumAIiT/ru2PoYRUd9fB2zSNKvbOSrhHkIWcXBym+ABLo VrpVy4P4vqqkjUfUgERFFcf7podYss1crBDIL+FL8v/AyEZ0NeJWMn/lZRQX2EFmqnQE Zlgt3QvYpYSzy6zgAzg+CB8moMOLNqHtnuQ6UHxYMaRc3t3y6AoQHbQdrmgk1Scp+gNC z5CQ== 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:dkim-signature; bh=hxFPSInE+vEN6eKFUjLJMuS7MoGA7EO1Vg9nswrDDNs=; fh=KBHEXvE8suT9TBBmlI1Jnztwrty78w1hVo85iVMp0c8=; b=ds6nOCngPTtHFKLncfMWwkYG4NyTXGVhUn4Ot21iCMbng8d1BJ6jnioash5ok7aP1j SSKz4vfoGk3buOg62rIy4iwBg9CgoLCBg/ar0nLJDFkAZtkDPHhqw+Hr2m4ywRYyjXjg BGdLjmeGe82qiIAVLdevXDxmLOIexTIi1UNJBe5Al+NHLhh2OuFBYJ1UZyb28DzrQFU9 oWaj8EVTYfx0rTloP8e2jPgwkZ8dNaBUURl5ds+EWUwxIqnUgCCRDaBIhL9I2wrIAd4v YNFrefrWUPGOaOeuiQW9aHvzfoX5R0XI3U3AQdNY1eZPsoCI2NBha4fCnMq+1SxpEcCI +SkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EasewVdw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y17-20020a056a00191100b006901387b09bsi1647052pfi.344.2023.10.05.08.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 08:40:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EasewVdw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 13B828240F76; Thu, 5 Oct 2023 08:40:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbjJEPkh (ORCPT + 99 others); Thu, 5 Oct 2023 11:40:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233930AbjJEPj4 (ORCPT ); Thu, 5 Oct 2023 11:39:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC17D35C14 for ; Thu, 5 Oct 2023 07:53:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 090C0C116B4; Thu, 5 Oct 2023 08:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696495954; bh=kdOVueCUGc2zsRpYF5bysHxKXG55y67tcQidRcCIZ4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EasewVdwafoq1yx5+UNUcJalaL3xX5dSjjN+pyIqUFn5/aR2m2nSP3mS4on9JKg+p G/jLyzOGa/cKdy//fnXTwvpp96dopSUsnkSx2WE4GLx0Bm1f/JAmZfpvUZTIZPVj8c lm8nU3NWPMw3WioArHBHdUbVEe7FeZf0o1VB00JzAsvhpfzC22EHj1U+rFiqLG0HAz GUkMU9x6PZkzDq9NaG444korw8CX4jNAahoJb6tBBt7sMiHxnHAxj7wmG10UurFtSo u9QGCVeT5zvvssOZBONO3snD22mkZ8XicLO5YoX2qrprbxPBoOxpAPLEP4sVvN6AHz eAw0TOVqn1T/Q== Date: Thu, 5 Oct 2023 10:52:30 +0200 From: Lorenzo Bianconi To: Jakub Kicinski Cc: Lorenzo Bianconi , Jeff Layton , linux-nfs@vger.kernel.org, neilb@suse.de, chuck.lever@oracle.com, netdev@vger.kernel.org Subject: Re: [PATCH] NFSD: convert write_threads and write_v4_end_grace to netlink commands Message-ID: References: <20231004100428.3ca993aa@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7N7cDQtYTEJaPqIG" Content-Disposition: inline In-Reply-To: <20231004100428.3ca993aa@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 05 Oct 2023 08:40:39 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email --7N7cDQtYTEJaPqIG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Fri, 22 Sep 2023 18:20:36 +0200 Lorenzo Bianconi wrote: > > > matter at all. Do we have to send down a value at all? =20 > >=20 > > I am not sure if ynl supports a doit operation with a request with no p= arameters. > > @Chuck, Jakub: any input here? >=20 > It should, if it doesn't LMK, I will fix.. ack, what I want to do is add a 'get' method w/o any parameter in the reque= st and with just one parameter in the reply (i.e. the number of running threads). = E.g: +++ b/Documentation/netlink/specs/nfsd.yaml @@ -62,6 +62,18 @@ attribute-sets: name: compound-ops type: u32 multi-attr: true + - + name: control-plane + attributes: + - + name: threads + type: u32 =20 operations: list: @@ -72,3 +84,54 @@ operations: dump: pre: nfsd-nl-rpc-status-get-start post: nfsd-nl-rpc-status-get-done + - + name: threads-set + doc: set the number of running threads + attribute-set: control-plane + flags: [ admin-perm ] + do: + request: + attributes: + - threads + - + name: threads-get + doc: get the number of running threads + attribute-set: control-plane + do: + reply: + attributes: + - threads running ynl-regen.sh, I got the following error for the get method: $ ./tools/net/ynl/ynl-regen.sh GEN kernel fs/nfsd/netlink.h Traceback (most recent call last): File "/home/lorenzo/workspace/nfsd-next/tools/net/ynl/ynl-gen-c.py", line= 2609, in main() File "/home/lorenzo/workspace/nfsd-next/tools/net/ynl/ynl-gen-c.py", line= 2445, in main print_req_policy_fwd(cw, ri.struct['request'], ri=3Dri) ~~~~~~~~~^^^^^^^^^^^ KeyError: 'request' am I missing something? Regards, Lorenzo --7N7cDQtYTEJaPqIG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZR55TgAKCRA6cBh0uS2t rN7DAQDYvw5l8F0Tv6kl9SuPPswPeHXr1Pynz59ksPeQTxeqaQD/Q6msrDMf8c0K TY2kVQ03zUHHaVJ7j68Ld650M0i1nQA= =QllE -----END PGP SIGNATURE----- --7N7cDQtYTEJaPqIG--