SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call
authorChuck Lever <chuck.lever@oracle.com>
Wed, 19 Jul 2023 18:31:09 +0000 (14:31 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 29 Aug 2023 21:45:22 +0000 (17:45 -0400)
commite18e157bb5c8c1cd8a9ba25acfdcf4f3035836f4
tree597d551dce6ba7f69a6a2107330db454b9327ad2
parent2eb2b93581813b74c7174961126f6ec38eadb5a7
SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call

There is now enough infrastructure in place to combine the stream
record marker into the biovec array used to send each outgoing RPC
message on TCP. The whole message can be more efficiently sent with
a single call to sock_sendmsg() using a bio_vec iterator.

Note that this also helps with RPC-with-TLS: the TLS implementation
can now clearly see where the upper layer message boundaries are.
Before, it would send each component of the xdr_buf (record marker,
head, page payload, tail) in separate TLS records.

Suggested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svcsock.h
net/sunrpc/svcsock.c