From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
Jeff Layton <jlayton@kernel.org>,
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
Date: Thu, 5 Oct 2023 10:52:30 +0200 [thread overview]
Message-ID: <ZR55TnN4Sr/O5z4a@lore-desk> (raw)
In-Reply-To: <20231004100428.3ca993aa@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1878 bytes --]
> 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?
> >
> > I am not sure if ynl supports a doit operation with a request with no parameters.
> > @Chuck, Jakub: any input here?
>
> 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 request 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
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 <module>
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=ri)
~~~~~~~~~^^^^^^^^^^^
KeyError: 'request'
am I missing something?
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-10-05 15:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 12:44 [PATCH] NFSD: convert write_threads and write_v4_end_grace to netlink commands Lorenzo Bianconi
2023-09-22 16:04 ` Jeff Layton
2023-09-22 16:06 ` Chuck Lever III
2023-09-22 16:21 ` Jeff Layton
2023-09-22 16:23 ` Lorenzo Bianconi
2023-09-22 17:23 ` Chuck Lever III
2023-09-22 16:20 ` Lorenzo Bianconi
2023-09-22 16:53 ` Jeff Layton
2023-09-22 17:25 ` Chuck Lever III
2023-09-22 19:25 ` Lorenzo Bianconi
2023-09-22 20:49 ` Chuck Lever III
2023-10-04 17:04 ` Jakub Kicinski
2023-10-05 8:52 ` Lorenzo Bianconi [this message]
2023-10-05 13:59 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZR55TnN4Sr/O5z4a@lore-desk \
--to=lorenzo@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).