> 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:
signature.asc
Description: PGP signature