From: Jeff Layton <jlayton@kernel.org>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>, Neil Brown <neilb@suse.de>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND v2] sunrpc: add netns inum and srcaddr to debugfs rpc_xprt info
Date: Wed, 05 Feb 2025 09:03:03 -0500 [thread overview]
Message-ID: <70b3bc567e56572d8c8ba816ce263b92ed4ce2d1.camel@kernel.org> (raw)
In-Reply-To: <20250205-nfs-6-14-v2-1-402e8072661f@kernel.org>
On Wed, 2025-02-05 at 08:43 -0500, Jeff Layton wrote:
> The output format should provide a value that matches the one in
> the /proc/<pid>/ns/net symlink. This makes it simpler to match the
> rpc_xprt and rpc_clnt to a particular container.
>
> Also, when the xprt defines the get_srcaddr operation, use that to
> display the source address as well.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> Changes in v2:
> - Don't bother with NUL termination, just use a length specifier
> - Link to v1: https://lore.kernel.org/r/20250122-nfs-6-14-v1-1-164b0b5aa330@kernel.org
> ---
> net/sunrpc/debugfs.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/net/sunrpc/debugfs.c b/net/sunrpc/debugfs.c
> index a176d5a0b0ee9a2c0ca1d1ed3131b67b782c3296..9498f385716d5eab1c5766a2a4ef5218155432e0 100644
> --- a/net/sunrpc/debugfs.c
> +++ b/net/sunrpc/debugfs.c
> @@ -179,6 +179,18 @@ xprt_info_show(struct seq_file *f, void *v)
> seq_printf(f, "addr: %s\n", xprt->address_strings[RPC_DISPLAY_ADDR]);
> seq_printf(f, "port: %s\n", xprt->address_strings[RPC_DISPLAY_PORT]);
> seq_printf(f, "state: 0x%lx\n", xprt->state);
> + seq_printf(f, "netns: %u\n", xprt->xprt_net->ns.inum);
> +
> + if (xprt->ops->get_srcaddr) {
> + int ret, buflen;
> + char buf[INET6_ADDRSTRLEN];
> +
> + buflen = ARRAY_SIZE(buf);
> + ret = xprt->ops->get_srcaddr(xprt, buf, buflen);
> + if (ret < 0)
> + ret = sprintf(buf, "<closed>");
> + seq_printf(f, "saddr: %.*s\n", ret, buf);
> + }
> return 0;
> }
>
>
> ---
> base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
> change-id: 20250122-nfs-6-14-7f737deb6356
>
> Best regards,
Please disregard this patch. I didn't realize Anna had picked this up
for v6.14.
Cheers,
--
Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2025-02-05 14:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 13:43 [PATCH RESEND v2] sunrpc: add netns inum and srcaddr to debugfs rpc_xprt info Jeff Layton
2025-02-05 14:03 ` Jeff Layton [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=70b3bc567e56572d8c8ba816ce263b92ed4ce2d1.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
--cc=trondmy@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