2008-08-27 20:58:00

by Chuck Lever III

[permalink] [raw]
Subject: [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost)

Based on review comments, I've changed how the NFSv4 callback server
starts its listener. If the kernel has IPv6 support, it will start an
AF_INET6 listener; otherwise it will start an AF_INET listener.

Subsequent lockd IPv6 patches already work this way, it turns out, so
I've updated the patch in this subseries that adds a helper to display
NLM IPv6 addresses. If an IPv6 address is a mapped IPv4 address, it
will be displayed as a dotted-quad instead of as an IPv6 address. This
should cause the helper to display IPv4-style addresses on systems that
use only IPv4, even though the listener is AF_INET6. This effects
only error and debugging messages.

I should revisit other areas (already integrated, and in pending
patches) which display presentation format addresses, to ensure they
follow suit.

---

Chuck Lever (6):
SUNRPC: Make svc_addr's argument a constant
lockd: Add address family-agnostic helper for zeroing the port number
lockd: Specify address family for source address
lockd: address-family independent printable addresses
NLM: Clean up before introducing new debugging messages
NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets


fs/lockd/host.c | 123 +++++++++++++++++++++++++++++++++----------
fs/nfs/callback.c | 19 +++++--
include/linux/lockd/lockd.h | 4 +
include/linux/sunrpc/svc.h | 6 +-
4 files changed, 115 insertions(+), 37 deletions(-)

--
Chuck Lever


2008-08-29 17:25:11

by [email protected]

[permalink] [raw]
Subject: Re: [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost)

On Wed, Aug 27, 2008 at 04:56:58PM -0400, Chuck Lever wrote:
> Based on review comments, I've changed how the NFSv4 callback server
> starts its listener. If the kernel has IPv6 support, it will start an
> AF_INET6 listener; otherwise it will start an AF_INET listener.
>
> Subsequent lockd IPv6 patches already work this way, it turns out, so
> I've updated the patch in this subseries that adds a helper to display
> NLM IPv6 addresses. If an IPv6 address is a mapped IPv4 address, it
> will be displayed as a dotted-quad instead of as an IPv6 address. This
> should cause the helper to display IPv4-style addresses on systems that
> use only IPv4, even though the listener is AF_INET6. This effects
> only error and debugging messages.
>
> I should revisit other areas (already integrated, and in pending
> patches) which display presentation format addresses, to ensure they
> follow suit.

I already applied 2-6, so I've removed those and replaced them by your
new versions. The resulting change is just the following.

I'm assuming #1 will be up to Trond.

I think I've got nothing else outstanding from you right now?

--b.

2008-08-29 17:25:32

by [email protected]

[permalink] [raw]
Subject: Re: [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost)

On Fri, Aug 29, 2008 at 01:25:06PM -0400, bfields wrote:
> On Wed, Aug 27, 2008 at 04:56:58PM -0400, Chuck Lever wrote:
> > Based on review comments, I've changed how the NFSv4 callback server
> > starts its listener. If the kernel has IPv6 support, it will start an
> > AF_INET6 listener; otherwise it will start an AF_INET listener.
> >
> > Subsequent lockd IPv6 patches already work this way, it turns out, so
> > I've updated the patch in this subseries that adds a helper to display
> > NLM IPv6 addresses. If an IPv6 address is a mapped IPv4 address, it
> > will be displayed as a dotted-quad instead of as an IPv6 address. This
> > should cause the helper to display IPv4-style addresses on systems that
> > use only IPv4, even though the listener is AF_INET6. This effects
> > only error and debugging messages.
> >
> > I should revisit other areas (already integrated, and in pending
> > patches) which display presentation format addresses, to ensure they
> > follow suit.
>
> I already applied 2-6, so I've removed those and replaced them by your
> new versions. The resulting change is just the following.

Whoops, sorry, I meant:

--b.

diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 3f0c1a8..008e402 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -18,6 +18,7 @@
#include <linux/lockd/sm_inter.h>
#include <linux/mutex.h>

+#include <net/ipv6.h>

#define NLMDBG_FACILITY NLMDBG_HOSTCACHE
#define NLM_HOST_NRHASH 32
@@ -65,7 +66,11 @@ static void nlm_display_address(const struct sockaddr *sap,
snprintf(buf, len, NIPQUAD_FMT, NIPQUAD(sin->sin_addr.s_addr));
break;
case AF_INET6:
- snprintf(buf, len, NIP6_FMT, NIP6(sin6->sin6_addr));
+ if (ipv6_addr_v4mapped(&sin6->sin6_addr))
+ snprintf(buf, len, NIPQUAD_FMT,
+ NIPQUAD(sin6->sin6_addr.s6_addr32[3]));
+ else
+ snprintf(buf, len, NIP6_FMT, NIP6(sin6->sin6_addr));
break;
default:
snprintf(buf, len, "unsupported address family");

2008-08-29 17:29:14

by Chuck Lever III

[permalink] [raw]
Subject: Re: [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost)

On Fri, Aug 29, 2008 at 1:25 PM, J. Bruce Fields <[email protected]> wrote:
> On Fri, Aug 29, 2008 at 01:25:06PM -0400, bfields wrote:
>> On Wed, Aug 27, 2008 at 04:56:58PM -0400, Chuck Lever wrote:
>> > Based on review comments, I've changed how the NFSv4 callback server
>> > starts its listener. If the kernel has IPv6 support, it will start an
>> > AF_INET6 listener; otherwise it will start an AF_INET listener.
>> >
>> > Subsequent lockd IPv6 patches already work this way, it turns out, so
>> > I've updated the patch in this subseries that adds a helper to display
>> > NLM IPv6 addresses. If an IPv6 address is a mapped IPv4 address, it
>> > will be displayed as a dotted-quad instead of as an IPv6 address. This
>> > should cause the helper to display IPv4-style addresses on systems that
>> > use only IPv4, even though the listener is AF_INET6. This effects
>> > only error and debugging messages.
>> >
>> > I should revisit other areas (already integrated, and in pending
>> > patches) which display presentation format addresses, to ensure they
>> > follow suit.
>>
>> I already applied 2-6, so I've removed those and replaced them by your
>> new versions. The resulting change is just the following.
>
> Whoops, sorry, I meant:
>
> --b.
>
> diff --git a/fs/lockd/host.c b/fs/lockd/host.c
> index 3f0c1a8..008e402 100644
> --- a/fs/lockd/host.c
> +++ b/fs/lockd/host.c
> @@ -18,6 +18,7 @@
> #include <linux/lockd/sm_inter.h>
> #include <linux/mutex.h>
>
> +#include <net/ipv6.h>
>
> #define NLMDBG_FACILITY NLMDBG_HOSTCACHE
> #define NLM_HOST_NRHASH 32
> @@ -65,7 +66,11 @@ static void nlm_display_address(const struct sockaddr *sap,
> snprintf(buf, len, NIPQUAD_FMT, NIPQUAD(sin->sin_addr.s_addr));
> break;
> case AF_INET6:
> - snprintf(buf, len, NIP6_FMT, NIP6(sin6->sin6_addr));
> + if (ipv6_addr_v4mapped(&sin6->sin6_addr))
> + snprintf(buf, len, NIPQUAD_FMT,
> + NIPQUAD(sin6->sin6_addr.s6_addr32[3]));
> + else
> + snprintf(buf, len, NIP6_FMT, NIP6(sin6->sin6_addr));
> break;
> default:
> snprintf(buf, len, "unsupported address family");

Yes, I think that's the only change in patches 2-6.

--
Chuck Lever