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
7474 struct rpc_authops;
7575 struct rpc_auth {
7676 unsigned int au_cslack; /* call cred size estimate */
77− /* guess at number of u32's auth adds before
78− * reply data; normally the verifier size: */
79− unsigned int au_rslack;
77+ unsigned int au_rslack; /* reply cred size estimate */
8078 unsigned int au_verfsize; /* size of reply verifier */
79+ unsigned int au_ralign; /* words before UL header */
8180
82− unsigned int au_flags; /* various flags */
83− const struct rpc_authops *au_ops; /* operations */
81+ unsigned int au_flags;
82+ const struct rpc_authops *au_ops;
8483 rpc_authflavor_t au_flavor; /* pseudoflavor (note may
8584 * differ from the flavor in
8685 * 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