public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: linux-nfs@vger.kernel.org, lorenzo.bianconi@redhat.com,
	neilb@suse.de, kuba@kernel.org, chuck.lever@oracle.com,
	horms@kernel.org, netdev@vger.kernel.org,
	Steve Dickson <steved@redhat.com>
Subject: Re: [PATCH v6 0/3] convert write_threads, write_version and write_ports to netlink commands
Date: Mon, 22 Jan 2024 18:01:59 +0100	[thread overview]
Message-ID: <Za6fh2cd7ljGj8k4@lore-desk> (raw)
In-Reply-To: <8b2054af2aa6b74e79aa898b5412b5cc44946f81.camel@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3394 bytes --]

> On Sat, 2024-01-20 at 18:33 +0100, Lorenzo Bianconi wrote:
> > Introduce write_threads, write_version and write_ports netlink
> > commands similar to the ones available through the procfs.
> > 
> > Changes since v5:
> > - for write_ports and write_version commands, userspace is expected to provide
> >   a NFS listeners/supported versions list it want to enable (all the other
> >   ports/versions will be disabled).
> > - fix comments
> > - rebase on top of nfsd-next
> > Changes since v4:
> > - rebase on top of nfsd-next tree
> > Changes since v3:
> > - drop write_maxconn and write_maxblksize for the moment
> > - add write_version and write_ports commands
> > Changes since v2:
> > - use u32 to store nthreads in nfsd_nl_threads_set_doit
> > - rename server-attr in control-plane in nfsd.yaml specs
> > Changes since v1:
> > - remove write_v4_end_grace command
> > - add write_maxblksize and write_maxconn netlink commands
> > 
> > This patch can be tested with user-space tool reported below:
> > https://github.com/LorenzoBianconi/nfsd-netlink.git
> > 
> > Lorenzo Bianconi (3):
> >   NFSD: convert write_threads to netlink command
> >   NFSD: add write_version to netlink command
> >   NFSD: add write_ports to netlink command
> > 
> >  Documentation/netlink/specs/nfsd.yaml |  94 ++++++
> >  fs/nfsd/netlink.c                     |  63 ++++
> >  fs/nfsd/netlink.h                     |  10 +
> >  fs/nfsd/nfsctl.c                      | 396 ++++++++++++++++++++++
> >  include/uapi/linux/nfsd_netlink.h     |  44 +++
> >  tools/net/ynl/generated/nfsd-user.c   | 460 ++++++++++++++++++++++++++
> >  tools/net/ynl/generated/nfsd-user.h   | 155 +++++++++
> >  7 files changed, 1222 insertions(+)
> > 
> 
> 
> I think this is really close and coming together! Before we merge this
> though, I'd _really_ like to see some patches for rpc.nfsd in nfs-utils.
> Until we try to implement the userland bits, we won't know if we've
> gotten this interface right.
> 
> ...and before that, we really need to have some sort of userland program
> packaged and available for querying the new netlink RPC stats from nfsd.
> You have the simple userland one on github, but I think we need omething
> packaged, ideally as part of nfs-utils.

Hi Jeff,

I guess we can experiment on the new APIs very easily with ynl cli.py.
Something like:

$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/nfsd.yaml --dump rpc-status-get
[{'compound-ops': [53, 22, 9],
 'daddr4': 3232266828,
 'dport': 2049,
 'flags': 5,
 'proc': 1,
 'prog': 100003,
 'saddr4': 3232266753,
 'service_time': 81705129,
 'sport': 908,
 'version': 4,
 'xid': 0},
{'compound-ops': [53, 22, 9],
 'daddr4': 3232266828,
 'dport': 2049,
 'flags': 5,
 'proc': 1,
 'prog': 100003,
 'saddr4': 3232266753,
 'service_time': 81700496,
 'sport': 908,
 'version': 4,
 'xid': 0}]

or 

./tools/net/ynl/cli.py --spec Documentation/netlink/specs/nfsd.yaml --do threads-get
{'threads': 8}

(the only required package is jsonschema iirc).

Regards,
Lorenzo

> 
> Doing that first would allow you to add the necessary autoconf/libtool
> stuff to pull in the netlink libraries, which will be a prerequisite for
> doing the userland rpc.nfsd work, and will probably be a bit simpler
> than modifying rpc.nfsd.
> -- 
> Jeff Layton <jlayton@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2024-01-22 17:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-20 17:33 [PATCH v6 0/3] convert write_threads, write_version and write_ports to netlink commands Lorenzo Bianconi
2024-01-20 17:33 ` [PATCH v6 1/3] NFSD: convert write_threads to netlink command Lorenzo Bianconi
2024-01-20 17:33 ` [PATCH v6 2/3] NFSD: add write_version " Lorenzo Bianconi
2024-01-22 13:27   ` Jeff Layton
2024-01-20 17:33 ` [PATCH v6 3/3] NFSD: add write_ports " Lorenzo Bianconi
2024-01-22 13:41   ` Jeff Layton
2024-01-22 15:35     ` Lorenzo Bianconi
2024-01-22 15:50       ` Jeff Layton
2024-01-22 15:59         ` Lorenzo Bianconi
2024-01-22 21:35     ` NeilBrown
2024-01-22 21:37       ` Jeff Layton
2024-01-22 22:58       ` Chuck Lever
2024-01-23  9:59         ` Lorenzo Bianconi
2024-01-23 11:17           ` Jeff Layton
2024-01-23 13:21             ` Lorenzo Bianconi
2024-01-23 14:28               ` Jeff Layton
2024-01-24  9:52                 ` Lorenzo Bianconi
2024-01-24 11:24                   ` Jeff Layton
2024-01-24 13:55                     ` Chuck Lever III
2024-01-24 18:10                       ` Jeff Layton
2024-01-25 22:44                       ` NeilBrown
2024-01-26  2:38                         ` Chuck Lever III
2024-01-26  7:27                           ` NeilBrown
2024-01-26 13:58                         ` Chuck Lever III
2024-01-22 16:31   ` kernel test robot
2024-01-22 13:49 ` [PATCH v6 0/3] convert write_threads, write_version and write_ports to netlink commands Jeff Layton
2024-01-22 17:01   ` Lorenzo Bianconi [this message]

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=Za6fh2cd7ljGj8k4@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=horms@kernel.org \
    --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 \
    --cc=steved@redhat.com \
    /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