netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: linux-nfs@vger.kernel.org, lorenzo.bianconi@redhat.com,
	neilb@suse.de, netdev@vger.kernel.org, jlayton@kernel.org,
	kuba@kernel.org
Subject: Re: [PATCH v5 3/3] NFSD: convert write_ports to netlink command
Date: Tue, 5 Dec 2023 20:37:33 +0000	[thread overview]
Message-ID: <20231205203733.GW50400@kernel.org> (raw)
In-Reply-To: <67251eabfbbccb806991e6437ebcf1cf00166017.1701277475.git.lorenzo@kernel.org>

On Wed, Nov 29, 2023 at 06:12:45PM +0100, Lorenzo Bianconi wrote:
> Introduce write_ports netlink command similar to the ones available
> through the procfs.
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

Hi Lorenzo,

some minor feedback from my side.

...

> @@ -1862,6 +1871,87 @@ int nfsd_nl_version_get_dumpit(struct sk_buff *skb,
>  	return ret;
>  }
>  
> +/**
> + * nfsd_nl_listener_start_doit - start the provided nfs server listener
> + * @skb: reply buffer
> + * @info: netlink metadata and command arguments
> + *
> + * Return 0 on success or a negative errno.
> + */
> +int nfsd_nl_listener_start_doit(struct sk_buff *skb, struct genl_info *info)
> +{
> +	int ret;
> +
> +	if (GENL_REQ_ATTR_CHECK(info, NFSD_A_SERVER_LISTENER_TRANSPORT_NAME) ||
> +	    GENL_REQ_ATTR_CHECK(info, NFSD_A_SERVER_LISTENER_PORT))
> +		return -EINVAL;
> +
> +	mutex_lock(&nfsd_mutex);
> +	ret = ___write_ports_addxprt(genl_info_net(info), get_current_cred(),
> +			nla_data(info->attrs[NFSD_A_SERVER_LISTENER_TRANSPORT_NAME]),
> +			nla_get_u32(info->attrs[NFSD_A_SERVER_LISTENER_PORT]));

gcc-13 and clang-17 W=1 builds warn that ret is set but otherwise unused in
this function.

> +	mutex_unlock(&nfsd_mutex);
> +
> +	return 0;
> +}
> +
> +/**
> + * nfsd_nl_version_get_dumpit - Handle listener_get dumpit

nit: nfsd_nl_listener_get_dumpit

> + * @skb: reply buffer
> + * @cb: netlink metadata and command arguments
> + *
> + * Returns the size of the reply or a negative errno.
> + */
> +int nfsd_nl_listener_get_dumpit(struct sk_buff *skb,
> +				struct netlink_callback *cb)

...

      parent reply	other threads:[~2023-12-05 20:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 17:12 [PATCH v5 0/3] convert write_threads, write_version and write_ports to netlink commands Lorenzo Bianconi
2023-11-29 17:12 ` [PATCH v5 1/3] NFSD: convert write_threads to netlink command Lorenzo Bianconi
2023-11-29 18:13   ` Jeff Layton
2023-11-29 18:31     ` Chuck Lever
2023-11-30  0:32       ` Jakub Kicinski
2023-11-29 17:12 ` [PATCH v5 2/3] NFSD: convert write_version " Lorenzo Bianconi
2023-11-29 18:23   ` Jeff Layton
2023-11-30  9:45     ` Lorenzo Bianconi
2023-11-30 16:17       ` Jeff Layton
2023-11-30 16:11     ` Chuck Lever
2023-11-30 16:25       ` Lorenzo Bianconi
2023-11-30 16:29         ` Chuck Lever
2023-11-30 16:32           ` Lorenzo Bianconi
2023-11-30  0:28   ` Jakub Kicinski
2023-11-30 10:32     ` Lorenzo Bianconi
2023-12-01  7:28       ` Jakub Kicinski
2023-12-05 20:33   ` Simon Horman
2023-11-29 17:12 ` [PATCH v5 3/3] NFSD: convert write_ports " Lorenzo Bianconi
2023-11-29 18:28   ` Jeff Layton
2023-11-30  9:57     ` Lorenzo Bianconi
2023-11-30 16:22       ` Jeff Layton
2023-11-30 16:55         ` Jeff Layton
2023-11-30 17:39           ` Chuck Lever
2023-11-30 18:01             ` Jeff Layton
2023-11-30 18:34               ` Chuck Lever
2023-12-05 20:37   ` Simon Horman [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=20231205203733.GW50400@kernel.org \
    --to=horms@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --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).