]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xdrgen: Keep track of on-the-wire data type widths
authorChuck Lever <chuck.lever@oracle.com>
Thu, 3 Oct 2024 18:54:33 +0000 (14:54 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 11 Nov 2024 18:42:01 +0000 (13:42 -0500)
commit631c2925bae41c11dcf3915a2ab5f3be9af54277
tree641a8c810550c1307bcf7044b691cc088d1e65ad
parent189f55d93d3eb76d733c28f0c70fd2d162a9ffc5
xdrgen: Keep track of on-the-wire data type widths

The generic parts of the RPC layer need to know the widths (in
XDR_UNIT increments) of the XDR data types defined for each
protocol.

As a first step, add dictionaries to keep track of the symbolic and
actual maximum XDR width of XDR types.

This makes it straightforward to look up the width of a type by its
name. The built-in dictionaries are pre-loaded with the widths of
the built-in XDR types as defined in RFC 4506.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/xdrgen/_defs.h
tools/net/sunrpc/xdrgen/xdr_ast.py