]> asedeno.scripts.mit.edu Git - linux.git/commit
SUNRPC: Add rpc_auth::au_ralign field
authorChuck Lever <chuck.lever@oracle.com>
Mon, 11 Feb 2019 16:25:36 +0000 (11:25 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 14 Feb 2019 16:48:36 +0000 (11:48 -0500)
commit35e77d21baa04b554bf3dc9a08dfa7e569286e51
treed6e48672b6fbd6ce82ba47438295b18b53b2c4b0
parenta00275baa68e1ee226cc659f54dc3a571f3ad600
SUNRPC: Add rpc_auth::au_ralign field

Currently rpc_inline_rcv_pages() uses au_rslack to estimate the
size of the upper layer reply header. This is fine for auth flavors
where au_verfsize == au_rslack.

However, some auth flavors have more going on. krb5i for example has
two more words after the verifier, and another blob following the
RPC message. The calculation involving au_rslack pushes the upper
layer reply header too far into the rcv_buf.

au_rslack is still valuable: it's the amount of buffer space needed
for the reply, and is used when allocating the reply buffer. We'll
keep that.

But, add a new field that can be used to properly estimate the
location of the upper layer header in each RPC reply, based on the
auth flavor in use.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/linux/sunrpc/auth.h
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_null.c
net/sunrpc/auth_unix.c
net/sunrpc/clnt.c