History

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.

Chuck Lever committed 7 years ago

Commit 35e77d21 parent a00275b5 files · +20 −11Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/sunrpc/auth.h+4−5
@@ -74,13 +74,12 @@ struct rpc_cred_cache; · 73 unmodified lines
74struct rpc_authops;74struct rpc_authops;
75struct rpc_auth {75struct rpc_auth {
76 unsigned int au_cslack; /* call cred size estimate */76 unsigned int au_cslack; /* call cred size estimate */
77 /* guess at number of u32's auth adds before77 unsigned int au_rslack; /* reply cred size estimate */
78 * reply data; normally the verifier size: */
79 unsigned int au_rslack;
80 unsigned int au_verfsize; /* size of reply verifier */78 unsigned int au_verfsize; /* size of reply verifier */
79 unsigned int au_ralign; /* words before UL header */
81 80
82 unsigned int au_flags; /* various flags */81 unsigned int au_flags;
83 const struct rpc_authops *au_ops; /* operations */82 const struct rpc_authops *au_ops;
84 rpc_authflavor_t au_flavor; /* pseudoflavor (note may83 rpc_authflavor_t au_flavor; /* pseudoflavor (note may
85 * differ from the flavor in84 * differ from the flavor in
86 * au_ops->au_flavor in gss85 * au_ops->au_flavor in gss

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t