From: Trond Myklebust <trondmy@gmail.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 3/4] SUNRPC: Allow for some re-ordering of RPCSEC_GSS requests on the server
Date: Wed, 2 Jan 2019 17:53:12 -0500 [thread overview]
Message-ID: <20190102225313.2097-4-trond.myklebust@hammerspace.com> (raw)
In-Reply-To: <20190102225313.2097-3-trond.myklebust@hammerspace.com>
Strictly speaking, the client is probably not supposed to transmit more
requests than are allowed for in the RPCSEC_GSS window. However since
we do, try to ensure that we allow for some re-ordering by the server.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
net/sunrpc/auth_gss/auth_gss.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index ba765473d1f0..dc7124d45c8a 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -2029,9 +2029,6 @@ gss_xmit_need_reencode(struct rpc_task *task)
if (!ctx)
return true;
- if (gss_seq_is_newer(req->rq_seqno, READ_ONCE(ctx->gc_seq)))
- goto out;
-
seq_xmit = READ_ONCE(ctx->gc_seq_xmit);
while (gss_seq_is_newer(req->rq_seqno, seq_xmit)) {
u32 tmp = seq_xmit;
@@ -2043,7 +2040,12 @@ gss_xmit_need_reencode(struct rpc_task *task)
}
}
- win = ctx->gc_win;
+ /*
+ * Ensure the request is within 3/4 of the RPCSEC_GSS sequence
+ * window so that we allow for some re-ordering of the requests
+ * by the server.
+ */
+ win = 3 * ((ctx->gc_win + 3) >> 2);
if (win > 0)
ret = !gss_seq_is_newer(req->rq_seqno, seq_xmit - win);
out:
--
2.20.1
next prev parent reply other threads:[~2019-01-02 22:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-02 22:53 [PATCH 0/4] bugfixes for RPCSEC_GSS client support Trond Myklebust
2019-01-02 22:53 ` [PATCH 1/4] SUNRPC: Ensure rq_bytes_sent is reset before request transmission Trond Myklebust
2019-01-02 22:53 ` [PATCH 2/4] SUNRPC: Fix the RPCSEC_GSS sequence semantics after request re-encoding Trond Myklebust
2019-01-02 22:53 ` Trond Myklebust [this message]
2019-01-02 22:53 ` [PATCH 4/4] SUNRPC: Ensure we respect the RPCSEC_GSS sequence number limit Trond Myklebust
2019-01-03 15:29 ` [PATCH 1/4] SUNRPC: Ensure rq_bytes_sent is reset before request transmission Chuck Lever
2019-01-03 16:05 ` Trond Myklebust
2019-01-03 16:17 ` Tom Talpey
2019-01-03 16:27 ` Trond Myklebust
2019-01-03 16:39 ` Chuck Lever
2019-01-03 16:41 ` Chuck Lever
2019-01-03 18:09 ` Trond Myklebust
2019-01-03 17:15 ` [PATCH 0/4] bugfixes for RPCSEC_GSS client support Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190102225313.2097-4-trond.myklebust@hammerspace.com \
--to=trondmy@gmail.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).