Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Olga Kornievskaia <okorniev@redhat.com>, steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] nfs-utils: nfsdctl: dont ignore rdma listener return
Date: Fri, 14 Feb 2025 11:00:53 -0500	[thread overview]
Message-ID: <c1d58f0d250e4933a47f6a6d3011802b9e335177.camel@kernel.org> (raw)
In-Reply-To: <20250213154722.37499-1-okorniev@redhat.com>

On Thu, 2025-02-13 at 10:47 -0500, Olga Kornievskaia wrote:
> Don't ignore return code of adding rdma listener. If nfs.conf has asked
> for "rdma=y" but adding the listener fails, don't ignore the failure.
> Note in soft-rdma-provider environment (such as soft iwarp, soft roce),
> when no address-constraints are used, an "any" listener is created and
> rdma-enabling is done independently.
> 
> Fixes: e3b72007ab31 ("nfs-utils: nfsdctl: cleanup listeners if some failed")
> Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
> ---
>  utils/nfsdctl/nfsdctl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/nfsdctl/nfsdctl.c b/utils/nfsdctl/nfsdctl.c
> index 05fecc71..244910ef 100644
> --- a/utils/nfsdctl/nfsdctl.c
> +++ b/utils/nfsdctl/nfsdctl.c
> @@ -1388,7 +1388,7 @@ static int configure_listeners(void)
>  			if (tcp)
>  				ret = add_listener("tcp", n->field, port);
>  			if (rdma)
> -				add_listener("rdma", n->field, rdma_port);
> +				ret = add_listener("rdma", n->field, rdma_port);
>  			if (ret)
>  				return ret;
>  		}
> @@ -1398,7 +1398,7 @@ static int configure_listeners(void)
>  		if (tcp)
>  			ret = add_listener("tcp", "", port);
>  		if (rdma)
> -			add_listener("rdma", "", rdma_port);
> +			ret = add_listener("rdma", "", rdma_port);
>  	}
>  	return ret;
>  }


add_listener() is just adding the given listener to the nfsd_sockets
array in memory. It's not consulting the kernel at that point. That
won't happen until set_listeners() is called.

It does make sense to check the return code though, just in case we
pass it some bogus arguments somehow. So...

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  parent reply	other threads:[~2025-02-14 16:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 15:47 [PATCH 1/1] nfs-utils: nfsdctl: dont ignore rdma listener return Olga Kornievskaia
2025-02-13 16:00 ` Chuck Lever
2025-02-13 17:30   ` Olga Kornievskaia
2025-02-14 14:23     ` Chuck Lever
2025-02-14 15:38       ` Olga Kornievskaia
2025-02-14 15:42         ` Chuck Lever
2025-02-14 15:58           ` Olga Kornievskaia
2025-02-14 16:00 ` Jeff Layton [this message]
2025-03-19 19:48 ` Steve Dickson

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=c1d58f0d250e4933a47f6a6d3011802b9e335177.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=okorniev@redhat.com \
    --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