From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 09/10] SUNRPC: Update xprt address strings after an rpcbind completes
Date: Thu, 06 Aug 2009 17:19:23 -0400 [thread overview]
Message-ID: <1249593563.5876.18.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <20090806185538.3458.20717.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
On Thu, 2009-08-06 at 14:55 -0400, Chuck Lever wrote:
> After a bind completes, update the transport instance's address
> strings so debugging messages display the current port the transport
> is connected to.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>
> net/sunrpc/xprtsock.c | 82 +++++++++++++++++++++++++------------------------
> 1 files changed, 41 insertions(+), 41 deletions(-)
>
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index eee5ac9..8aaf900 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -299,11 +299,34 @@ static inline struct sockaddr_in6 *xs_addr_in6(struct rpc_xprt *xprt)
> static void xs_format_common_peer_addresses(struct rpc_xprt *xprt)
> {
> struct sockaddr *sap = xs_addr(xprt);
> + struct sockaddr_in6 *sin6;
> + struct sockaddr_in *sin;
> char buf[128];
>
> (void)rpc_ntop(sap, buf, sizeof(buf));
> xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL);
>
> + switch (sap->sa_family) {
> + case AF_INET:
> + sin = xs_addr_in(xprt);
> + (void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
> + NIPQUAD(sin->sin_addr.s_addr));
> + break;
> + case AF_INET6:
> + sin6 = xs_addr_in6(xprt);
> + (void)snprintf(buf, sizeof(buf), "%pi6", &sin6->sin6_addr);
> + break;
Hmm... Doesn't it make sense to convert this to use rpc_ntop() now that
I've applied those patches?
Trond
next prev parent reply other threads:[~2009-08-06 21:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 18:54 [PATCH 00/10] Update rpcbind client's XDR functions [take 2] Chuck Lever
2009-08-06 18:54 ` [PATCH 03/10] SUNRPC: Introduce xdr_stream-based decoders for RPCB_UNSET Chuck Lever
[not found] ` <20090806184944.3458.44739.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2009-08-06 18:54 ` [PATCH 01/10] SUNRPC: Introduce new xdr_stream-based encoders to rpcb_clnt.c Chuck Lever
2009-08-06 18:54 ` [PATCH 02/10] SUNRPC: Clean up: Remove unused XDR encoder functions from rpcb_clnt.c Chuck Lever
2009-08-06 18:55 ` [PATCH 04/10] SUNRPC: Introduce new xdr_stream-based decoders to rpcb_clnt.c Chuck Lever
2009-08-06 18:55 ` [PATCH 05/10] SUNRPC: Clean up: Remove unused XDR decoder functions from rpcb_clnt.c Chuck Lever
2009-08-06 18:55 ` [PATCH 06/10] SUNRPC: Eliminate PROC macro from rpcb_clnt Chuck Lever
2009-08-06 18:55 ` [PATCH 07/10] SUNRPC: Rename sock_xprt.addr as sock_xprt.srcaddr Chuck Lever
2009-08-06 18:55 ` [PATCH 08/10] SUNRPC: Kill RPC_DISPLAY_ALL Chuck Lever
2009-08-06 18:55 ` [PATCH 09/10] SUNRPC: Update xprt address strings after an rpcbind completes Chuck Lever
[not found] ` <20090806185538.3458.20717.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2009-08-06 21:19 ` Trond Myklebust [this message]
[not found] ` <1249593563.5876.18.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-08-06 21:32 ` Chuck Lever
2009-08-06 18:55 ` [PATCH 10/10] SUNRPC: Add documenting comments in net/sunrpc/timer.c Chuck Lever
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=1249593563.5876.18.camel@heimdal.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@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