]> git.ipfire.org Git - thirdparty/linux.git/commit
Documentation: Add the RPC language description of NLM version 4
authorChuck Lever <chuck.lever@oracle.com>
Tue, 17 Feb 2026 22:06:53 +0000 (17:06 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
commit5bc37b759ec0cdde2c652a2637d704f2d6306617
tree24c028a6fc5742bb1b97192e2191d3d6147c0d64
parentf52792f484ba2316853736856dde19b7e7458861
Documentation: Add the RPC language description of NLM version 4

In order to generate source code to encode and decode NLMv4 protocol
elements, include a copy of the RPC language description of NLMv4
for xdrgen to process. The language description is an amalgam of
RFC 1813 and the Open Group's XNFS specification:

  https://pubs.opengroup.org/onlinepubs/9629799/chap10.htm

The C code committed here was generated from the new nlm4.x file
using tools/net/sunrpc/xdrgen/xdrgen.

The goals of replacing hand-written XDR functions with ones that
are tool-generated are to improve memory safety and make XDR
encoding and decoding less brittle to maintain.

The xdrgen utility derives both the type definitions and the
encode/decode functions directly from protocol specifications,
using names and symbols familiar to anyone who knows those specs.
Unlike hand-written code that can inadvertently diverge from the
specification, xdrgen guarantees that the generated code matches
the specification exactly.

We would eventually like xdrgen to generate Rust code as well,
making the conversion of the kernel's NFS stacks to use Rust just
a little easier for us.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Documentation/sunrpc/xdr/nlm4.x [new file with mode: 0644]
fs/lockd/Makefile
fs/lockd/nlm4xdr_gen.c [new file with mode: 0644]
fs/lockd/nlm4xdr_gen.h [new file with mode: 0644]
include/linux/sunrpc/xdrgen/nlm4.h [new file with mode: 0644]