Skip to content

RFC: IPv6 support for kernel NSM

Chuck Lever linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14NLM: Beef up NLM address display functionfs/lockd/host.c include/linux/lockd/lockd.h+48 -162 replies
2/14NSM: Move nsm_find() to fs/lockd/mon.cfs/lockd/host.c fs/lockd/mon.c include/linux/lockd/lockd.h+96 -920 replies
3/14NSM: Support IPv6 version of mon_namefs/lockd/mon.c+15 -282 replies
4/14NSM: Move NSM-related function and variable declarations to lockd.hfs/lockd/mon.c include/linux/lockd/lockd.h include/linux/lockd/sm_inter.h+14 -121 reply
5/14NSM: Move NSM-related XDR data structures to lockd's xdr.hfs/lockd/mon.c include/linux/lockd/sm_inter.h+14 -200 replies
6/14NSM: Move NSM program and procedure numbers to fs/lockd/mon.cfs/lockd/mon.c include/linux/lockd/sm_inter.h+25 -210 replies
7/14NSM: Generate "priv" argument when nsm_handle is createdfs/lockd/mon.c include/linux/lockd/lockd.h include/linux/lockd/sm_inter.h +1 more+25 -120 replies
8/14NLM: Change nlm_host_rebooted() to take a single nlm_reboot argumentfs/lockd/host.c fs/lockd/svc4proc.c fs/lockd/svcproc.c +1 more+20 -360 replies
9/14NLM: Decode "priv" argument of NLM_SM_NOTIFY as an opaquefs/lockd/host.c fs/lockd/xdr.c fs/lockd/xdr4.c +1 more+10 -90 replies
10/14NSM: Add nsm_lookup() functionfs/lockd/host.c fs/lockd/mon.c include/linux/lockd/lockd.h+50 -70 replies
11/14NSM: Replace IP address as our nlm_reboot lookup keyfs/lockd/mon.c+16 -40 replies
12/14NSM: Remove include/linux/lockd/sm_inter.hfs/lockd/clntproc.c fs/lockd/host.c fs/lockd/mon.c +8 more+1 -260 replies
13/14NLM: Remove "create" argument from nsm_find()fs/lockd/host.c fs/lockd/mon.c include/linux/lockd/lockd.h+9 -131 reply
14/14NSM: Use same helpers in nsm_get_handle() and nsm_lookup_rebooted()fs/lockd/mon.c+58 -390 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/14] RFC: IPv6 support for kernel NSM

I'm interested in some comments on the following proposal for supporting IPv6 in the kernel's NSM implementation.

The first three patches simply add support for using an IPv6 address for the mon_name argument when nsm_use_hostnames is not set. Nothing too complex there. It re-uses the address display functions in fs/lockd/host.c to generate the address string.

The middle eight patches replace the contents of the "priv" argument to the SM_MON upcall and the NLM_SM_NOTIFY downcall. We use a 32-bit raw IPv4 address today, so we have to replace it with something else to support IPv6 properly. I propose using an arbitrary unique cookie for each nsm_handle.

This is a little more extensive than a simple change here, as I decided to re-organize this code a little bit to make it simpler to understand and modify. The idea is to move as many NSM-related data structures and functions into fs/lockd/mon.c. The creation and interpretation of the cookies should happen in just this one place, and not be spread around in fs/lockd/host.c and in lockd's XDR layer. It should be easier to understand and relate the various pieces now.

The last three patches are clean-ups that result from this reorganization.

This patch set builds, but has not been tested. Constructive comments and review are welcome.

---

Chuck Lever (14):
NSM: Use same helpers in nsm_get_handle() and nsm_lookup_rebooted()
NLM: Remove "create" argument from nsm_find()
NSM: Remove include/linux/lockd/sm_inter.h
NSM: Replace IP address as our nlm_reboot lookup key
NSM: Add nsm_lookup() function
NLM: Decode "priv" argument of NLM_SM_NOTIFY as an opaque
NLM: Change nlm_host_rebooted() to take a single nlm_reboot argument
NSM: Generate "priv" argument when nsm_handle is created
NSM: Move NSM program and procedure numbers to fs/lockd/mon.c
NSM: Move NSM-related XDR data structures to lockd's xdr.h
NSM: Move NSM-related function and variable declarations to lockd.h
NSM: Support IPv6 version of mon_name
NSM: Move nsm_find() to fs/lockd/mon.c
NLM: Beef up NLM address display function

 fs/lockd/clntproc.c            |    1 
 fs/lockd/host.c                |  173 +++++++----------------
 fs/lockd/mon.c                 |  298 ++++++++++++++++++++++++++++++++--------
 fs/lockd/svc.c                 |    1 
 fs/lockd/svc4proc.c            |   13 --
 fs/lockd/svcproc.c             |   13 --
 fs/lockd/svcsubs.c             |    1 
 fs/lockd/xdr.c                 |    5 -
 fs/lockd/xdr4.c                |    5 -
 include/linux/lockd/lockd.h    |   31 +++-
 include/linux/lockd/sm_inter.h |   48 ------
 include/linux/lockd/xdr.h      |   15 +-
 12 files changed, 335 insertions(+), 269 deletions(-)
 delete mode 100644 include/linux/lockd/sm_inter.h
Signature · 1 line
Chuck Lever