deepin-kernel/net/sunrpc
Nikhil Jha 2eb8aa18d5 sunrpc: don't immediately retransmit on seqno miss
[ Upstream commit fadc0f3bb2de8c570ced6d9c1f97222213d93140 ]

RFC2203 requires that retransmitted messages use a new gss sequence
number, but the same XID. This means that if the server is just slow
(e.x. overloaded), the client might receive a response using an older
seqno than the one it has recorded.

Currently, Linux's client immediately retransmits in this case. However,
this leads to a lot of wasted retransmits until the server eventually
responds faster than the client can resend.

Client -> SEQ 1 -> Server
Client -> SEQ 2 -> Server
Client <- SEQ 1 <- Server (misses, expecting seqno = 2)
Client -> SEQ 3 -> Server (immediate retransmission on miss)
Client <- SEQ 2 <- Server (misses, expecting seqno = 3)
Client -> SEQ 4 -> Server (immediate retransmission on miss)
... and so on ...

This commit makes it so that we ignore messages with bad checksums
due to seqnum mismatch, and rely on the usual timeout behavior for
retransmission instead of doing so immediately.

Signed-off-by: Nikhil Jha <njha@janestreet.com>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c3616dfddf1d484839ea853a25063ab7452e44e9)
2025-07-09 09:49:54 +08:00
..
auth_gss gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey 2024-12-10 20:39:44 +08:00
xprtrdma svcrdma: fix miss destroy percpu_counter in svc_rdma_proc_init() 2024-12-10 20:44:58 +08:00
.kunitconfig SUNRPC: Remove RPCSEC_GSS_KRB5_ENCTYPES_DES 2023-08-29 17:45:22 -04:00
Kconfig SUNRPC: Remove CONFIG_RPCSEC_GSS_KRB5_CRYPTOSYSTEM 2023-08-29 17:45:22 -04:00
Makefile SUNRPC: Add RPC client support for the RPC_AUTH_TLS auth flavor 2023-06-19 12:18:36 -04:00
addr.c net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr() 2024-03-26 18:20:01 -04:00
auth.c HAOC: Add support for x86 CRED Protection (CREDP). 2025-05-12 15:02:47 +08:00
auth_null.c
auth_tls.c SUNRPC: Fail quickly when server does not recognize TLS 2023-09-27 15:16:40 -04:00
auth_unix.c
backchannel_rqst.c NFS client updates for Linux 5.20 2022-08-10 14:04:32 -07:00
cache.c sunrpc: suppress warnings for unused procfs functions 2025-03-17 20:08:50 +08:00
clnt.c sunrpc: don't immediately retransmit on seqno miss 2025-07-09 09:49:54 +08:00
debugfs.c SUNRPC: Cache deferral injection 2022-05-19 12:25:38 -04:00
fail.h SUNRPC: Cache deferral injection 2022-05-19 12:25:38 -04:00
netns.h SUNRPC: Fix occasional warning when destroying gss_krb5_enctypes 2023-02-20 09:20:57 -05:00
rpc_pipe.c sunrpc: convert to ctime accessor functions 2023-07-24 10:30:07 +02:00
rpcb_clnt.c SUNRPC: rpcbind should never reset the port to the value '0' 2025-06-10 10:34:51 +08:00
sched.c SUNRPC: Don't allow waiting for exiting tasks 2025-06-10 10:34:50 +08:00
socklib.c use less confusing names for iov_iter direction initializers 2022-11-25 13:01:55 -05:00
socklib.h
stats.c sunrpc: use the struct net as the svc proc private 2024-12-10 20:40:33 +08:00
sunrpc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE 2022-06-10 14:51:35 +02:00
sunrpc_syms.c
svc.c sunrpc: handle SVC_GARBAGE during svc auth processing as auth error 2025-07-03 11:32:09 +08:00
svc_xprt.c SUNRPC: Revert 5f7fc5d69f 2024-01-01 12:42:26 +00:00
svcauth.c SUNRPC: Add enum svc_auth_status 2023-08-29 17:45:22 -04:00
svcauth_unix.c SUNRPC: Add enum svc_auth_status 2023-08-29 17:45:22 -04:00
svcsock.c Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages" 2025-02-10 01:59:56 +08:00
sysctl.c sunrpc: simplify one-level sysctl registration for debug_table 2023-04-11 12:45:19 -04:00
sysfs.c SUNRPC: Add a TCP-with-TLS RPC transport class 2023-06-19 12:28:10 -04:00
sysfs.h NFS: Add sysfs links to sunrpc clients for nfs_clients 2023-06-19 15:04:13 -04:00
timer.c
xdr.c NFS CLient Updates for Linux 6.6 2023-08-31 15:36:41 -07:00
xprt.c timers: Get rid of del_singleshot_timer_sync() 2022-11-24 15:09:10 +01:00
xprtmultipath.c SUNRPC: Fix a suspicious RCU usage warning 2024-02-05 20:14:17 +00:00
xprtsock.c SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls 2025-07-03 11:31:51 +08:00