xdrgen: Update the files included in client-side source codeIn particular, client-side source code needs the definition of"struct rpc_procinfo" and does not want header files that pullin "struct
xdrgen: Update the files included in client-side source codeIn particular, client-side source code needs the definition of"struct rpc_procinfo" and does not want header files that pullin "struct svc_rqst". Otherwise, the source does not compile.Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
show more ...
tools: Add xdrgenAdd a Python-based tool for translating XDR specifications into XDRencoder and decoder functions written in the Linux kernel's C codingstyle. The generator attempts to match the
tools: Add xdrgenAdd a Python-based tool for translating XDR specifications into XDRencoder and decoder functions written in the Linux kernel's C codingstyle. The generator attempts to match the usual C coding style ofthe Linux kernel's SunRPC consumers.This approach is similar to the netlink code generator intools/net/ynl .The maintainability benefits of machine-generated XDR code include:- Stronger type checking- Reduces the number of bugs introduced by human error- Makes the XDR code easier to audit and analyze- Enables rapid prototyping of new RPC-based protocols- Hardens the layering between protocol logic and marshaling- Makes it easier to add observability on demand- Unit tests might be built for both the tool and (automatically) for the generated codeIn addition, converting the XDR layer to use memory-safe languagessuch as Rust will be easier if much of the code can be convertedautomatically.Tested-by: Jeff Layton <jlayton@kernel.org>Signed-off-by: Chuck Lever <chuck.lever@oracle.com>