rx: Do not count RXGEN_OPCODE towards abort threshold

An RXGEN_OPCODE is returned for opcodes that are not implemented by the
rx service.  These opcodes might be deprecated opcodes that are no
longer supported or more recently registered opcodes that have yet to
be implemented.  Clients should not be punished for issuing unsupported
calls.  The clients might be old and are issuing no longer supported
calls or they might be newer and are issuing yet to be implemented calls
as part of a feature test and fallback strategy.

This change ignores RXGEN_OPCODE errors when deciding how to adjust the
rx_call.abortCount.  When an RXGEN_OPCODE abort is sent the
rx_call.abortCount and rx_call.abortError are left unchanged which
preserves the state for the next failing call.

Note that this change intentionlly prevents the incrementing of the
abortCount for client connections as they never send delay aborts.

Reviewed-on: https://gerrit.openafs.org/12906
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit f82d1c7d5a)

Reviewed-on: https://gerrit.openafs.org/12914
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 774df869fc)

Change-Id: I58d77ada0724cdb8231eaeba94d6661e87b2574a
Reviewed-on: https://gerrit.openafs.org/12929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
Jeffrey Altman 2018-02-10 10:47:24 -05:00 committed by Stephan Wiesand
parent 83e92f2745
commit 38f6a2243c

View File

@ -5185,7 +5185,14 @@ rxi_SendCallAbort(struct rx_call *call, struct rx_packet *packet,
if (rx_IsClientConn(call->conn))
force = 1;
if (call->abortCode != cerror) {
/*
* An opcode that has been deprecated or has yet to be implemented is not
* a misbehavior of the client. Do not punish the client by introducing
* delays.
*/
if (cerror == RXGEN_OPCODE) {
force = 1;
} else if (call->abortCode != cerror) {
call->abortCode = cerror;
call->abortCount = 0;
}
@ -5197,7 +5204,8 @@ rxi_SendCallAbort(struct rx_call *call, struct rx_packet *packet,
RX_CALL_REFCOUNT_ABORT);
}
error = htonl(cerror);
call->abortCount++;
if (!force)
call->abortCount++;
packet =
rxi_SendSpecial(call, call->conn, packet, RX_PACKET_TYPE_ABORT,
(char *)&error, sizeof(error), istack);