freebsd-nq/sys/rpc
Rick Macklem 4302e8b671 Modify the way the client side krpc does soreceive() for TCP.
Without this patch, clnt_vc_soupcall() first does a soreceive() for
4 bytes (the Sun RPC over TCP record mark) and then soreceive(s) for
the RPC message.
This first soreceive() almost always results in an mbuf allocation,
since having the 4byte record mark in a separate mbuf in the socket
rcv queue is unlikely.
This is somewhat inefficient and rather odd. It also will not work
for the ktls rx, since the latter returns a TLS record for each
soreceive().

This patch replaces the above with code similar to what the server side
of the krpc does for TCP, where it does a soreceive() for as much data
as possible and then parses RPC messages out of the received data.
A new field of the TCP socket structure called ct_raw is the list of
received mbufs that the RPC message(s) are parsed from.
I think this results in cleaner code and is needed for support of
nfs-over-tls.
It also fixes the code for the case where a server sends an RPC message
in multiple RPC message fragments. Although this is allowed by RFC5531,
no extant NFS server does this. However, it is probably good to fix this
in case some future NFS server does do this.
2020-06-21 00:06:04 +00:00
..
rpcsec_gss Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
auth_none.c
auth_unix.c
auth.h
authunix_prot.c
clnt_bck.c
clnt_dg.c Change the xid for client side krpc over UDP to a global value. 2020-04-05 21:08:17 +00:00
clnt_rc.c
clnt_stat.h
clnt_vc.c Modify the way the client side krpc does soreceive() for TCP. 2020-06-21 00:06:04 +00:00
clnt.h
getnetconfig.c
krpc.h Modify the way the client side krpc does soreceive() for TCP. 2020-06-21 00:06:04 +00:00
netconfig.h
nettype.h
pmap_prot.h
replay.c
replay.h
rpc_callmsg.c
rpc_com.h
rpc_generic.c Split XDR into separate kernel module. Make krpc depend on xdr. 2020-04-17 06:04:20 +00:00
rpc_msg.h
rpc_prot.c Move M_RPC malloc type into XDR. Both RPC and XDR libraries use 2020-04-17 06:02:13 +00:00
rpc.h
rpcb_clnt.c
rpcb_clnt.h
rpcb_prot.c
rpcb_prot.h
rpcm_subs.h
rpcsec_gss.h
rpcsec_tls.h Add the .h file that describes the operations for the rpctls_syscall. 2020-05-31 01:12:52 +00:00
svc_auth_unix.c
svc_auth.c
svc_auth.h
svc_dg.c
svc_generic.c
svc_vc.c Avoid relying on header pollution from sys/refcount.h. 2019-07-29 20:26:01 +00:00
svc.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
svc.h
types.h
xdr.h