linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: trond.myklebust@netapp.com, bfields@fieldses.org, steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 00/17] Proposed fix for blacklisted ipv6.ko
Date: Tue, 03 Mar 2009 17:32:06 -0500	[thread overview]
Message-ID: <20090303220539.2933.15015.stgit@ingres.1015granger.net> (raw)

I'm prototyping a different solution for handling the case where the
ipv6 module is not loadable at run-time.

Instead of the single RPC listener socket model that handles requests
of both address families, I've changed the kernel RPC server to use
PF_INET-only and PF_INET6-only sockets.  Each service always starts
PF_INET listeners, then tries to start PF_INET6 listeners.  If the
PF_INET6 transport creation call fails with -EAFNOSUPPORT, the error
is ignored and we are left with just the PF_INET listener.

For the case when no IPv6 support is built into the kernel, this
degenerates to exactly the same code paths and behaviors we have
today with PF_INET.

This solution is a bit more general than using a single listener.  If
we ever have to support another address family (say, AF_IPX, for
example) we just add another svc_create_xprt() call where needed.

This is also much the same as TI-RPC -- inet6 listeners run alongside
IPv4 listeners, and do not handle the same traffic.

This has the benefit that requests coming in on a PF_INET6 listener
will never see mapped IPv4 addresses.  Thus we can always use a simple
straightforward address comparison for NFSv4 and NLM callbacks -- both
addresses (the incoming request and the server host address) have to
be of the same family.

This approach adopts the same internal API changes as before:
svc_create() no longer takes an address family argument.  It's passed
in to svc_create_xprt().  This matches up with svc_find_xprt(), which
takes an address family when searching for an existing transport.

I've done some light testing, so how about a little review of this
approach?  Some of these patches are recycled, thus it won't be
entirely unfamiliar if you've looked at earlier proposals.

I'd appreciate some quick perusal of this work since 2.6.30 is coming
soon.  I'd like to have a decision between this approach and the
previous approach (retry with PF_INET if PF_INET6 creation fails)
so we can proceed with addressing this in 2.6.30.

Thanks!

---

Chuck Lever (17):
      NFS: Start PF_INET6 callback listener only if IPv6 support is available
      lockd: Start PF_INET6 listener only if IPv6 support is available
      SUNRPC: Remove CONFIG_SUNRPC_REGISTER_V4
      SUNRPC: rpcb_register() should handle errors silently
      SUNRPC: Simplify kernel RPC service registration
      SUNRPC: Simplify svc_unregister()
      SUNRPC: Allow callers to pass rpcb_v4_register a NULL address
      SUNRPC: Use "0" as r_owner
      SUNRPC: Clean up address type casts in rpcb_v4_register()
      SUNRPC: Don't return EPROTONOSUPPORT in svc_register()'s helpers
      SUNRPC: Use IPv4 loopback for registering AF_INET6 kernel RPC services
      SUNRPC: Set IPV6ONLY flag on PF_INET6 RPC listener sockets
      NFS: Revert creation of IPv6 listeners for lockd and NFSv4 callbacks
      SUNRPC: Remove @family argument from svc_create() and svc_create_pooled()
      SUNRPC: Change svc_create_xprt() to take a @family argument
      SUNRPC: svc_setup_socket() gets protocol family from socket
      SUNRPC: Pass a family argument to svc_register()


 fs/lockd/svc.c                  |   40 +++++-----
 fs/nfs/callback.c               |   31 ++++----
 fs/nfs/callback.h               |    1 
 fs/nfs/nfs4state.c              |   10 ++
 fs/nfsd/nfsctl.c                |    2 
 fs/nfsd/nfssvc.c                |    5 -
 include/linux/sunrpc/svc.h      |    9 +-
 include/linux/sunrpc/svc_xprt.h |    3 -
 net/sunrpc/Kconfig              |   22 -----
 net/sunrpc/rpcb_clnt.c          |   85 +++++++++++----------
 net/sunrpc/svc.c                |  158 ++++++++++++++++++---------------------
 net/sunrpc/svc_xprt.c           |   15 ++--
 net/sunrpc/svcsock.c            |   14 +--
 13 files changed, 188 insertions(+), 207 deletions(-)

-- 
Chuck Lever

             reply	other threads:[~2009-03-03 22:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 22:32 Chuck Lever [this message]
     [not found] ` <20090303220539.2933.15015.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-03-03 22:32   ` [PATCH 01/17] SUNRPC: Pass a family argument to svc_register() Chuck Lever
2009-03-03 22:32   ` [PATCH 02/17] SUNRPC: svc_setup_socket() gets protocol family from socket Chuck Lever
2009-03-03 22:32   ` [PATCH 03/17] SUNRPC: Change svc_create_xprt() to take a @family argument Chuck Lever
2009-03-03 22:32   ` [PATCH 04/17] SUNRPC: Remove @family argument from svc_create() and svc_create_pooled() Chuck Lever
2009-03-03 22:32   ` [PATCH 05/17] NFS: Revert creation of IPv6 listeners for lockd and NFSv4 callbacks Chuck Lever
2009-03-03 22:32   ` [PATCH 06/17] SUNRPC: Set IPV6ONLY flag on PF_INET6 RPC listener sockets Chuck Lever
     [not found]     ` <20090303223254.2933.70364.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-03-30 22:17       ` [PATCH 06/17] SUNRPC: Set IPV6ONLY flag on PF_INET6 RPC listenersockets Trond Myklebust
     [not found]         ` <1238451467.23512.11.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-03-30 22:28           ` Chuck Lever
2009-03-30 22:37             ` Trond Myklebust
     [not found]               ` <1238452665.23512.13.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-03-30 22:45                 ` Chuck Lever
2009-03-31 12:19                 ` Trond Myklebust
     [not found]                   ` <1238501960.31172.1.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-03-31 15:32                     ` Chuck Lever
2009-03-03 22:33   ` [PATCH 07/17] SUNRPC: Use IPv4 loopback for registering AF_INET6 kernel RPC services Chuck Lever
2009-03-03 22:33   ` [PATCH 08/17] SUNRPC: Don't return EPROTONOSUPPORT in svc_register()'s helpers Chuck Lever
     [not found]     ` <20090303223309.2933.51773.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-03-11 18:32       ` J. Bruce Fields
2009-03-03 22:33   ` [PATCH 09/17] SUNRPC: Clean up address type casts in rpcb_v4_register() Chuck Lever
2009-03-03 22:33   ` [PATCH 10/17] SUNRPC: Use "0" as r_owner Chuck Lever
     [not found]     ` <20090303223324.2933.57002.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-03-11 19:06       ` J. Bruce Fields
2009-03-11 19:57         ` Chuck Lever
2009-03-11 20:09           ` J. Bruce Fields
2009-03-11 20:18             ` Chuck Lever
2009-03-03 22:33   ` [PATCH 11/17] SUNRPC: Allow callers to pass rpcb_v4_register a NULL address Chuck Lever
2009-03-03 22:33   ` [PATCH 12/17] SUNRPC: Simplify svc_unregister() Chuck Lever
2009-03-03 22:33   ` [PATCH 13/17] SUNRPC: Simplify kernel RPC service registration Chuck Lever
2009-03-03 22:33   ` [PATCH 14/17] SUNRPC: rpcb_register() should handle errors silently Chuck Lever
2009-03-03 22:34   ` [PATCH 15/17] SUNRPC: Remove CONFIG_SUNRPC_REGISTER_V4 Chuck Lever
2009-03-03 22:34   ` [PATCH 16/17] lockd: Start PF_INET6 listener only if IPv6 support is available Chuck Lever
     [not found]     ` <20090303223410.2933.90223.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-03-30 22:06       ` [PATCH 16/17] lockd: Start PF_INET6 listener only if IPv6 support isavailable Trond Myklebust
2009-03-03 22:34   ` [PATCH 17/17] NFS: Start PF_INET6 callback listener only if IPv6 support is available 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=20090303220539.2933.15015.stgit@ingres.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    --cc=trond.myklebust@netapp.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;
as well as URLs for NNTP newsgroup(s).