summaryrefslogtreecommitdiff
path: root/Documentation/networking/rxrpc.txt
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-08-29 12:18:56 +0300
committerDavid Howells <dhowells@redhat.com>2017-08-29 12:55:20 +0300
commite833251ad813168253fef9915aaf6a8c883337b0 (patch)
treed9eae5c029cf3e3439076dc79e1aaeff16bff126 /Documentation/networking/rxrpc.txt
parent3ec0efde582e7e86a1a853ef96468aff86090d20 (diff)
downloadlinux-e833251ad813168253fef9915aaf6a8c883337b0.tar.xz
rxrpc: Add notification of end-of-Tx phase
Add a callback to rxrpc_kernel_send_data() so that a kernel service can get a notification that the AF_RXRPC call has transitioned out the Tx phase and is now waiting for a reply or a final ACK. This is called from AF_RXRPC with the call state lock held so the notification is guaranteed to come before any reply is passed back. Further, modify the AFS filesystem to make use of this so that we don't have to change the afs_call state before sending the last bit of data. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'Documentation/networking/rxrpc.txt')
-rw-r--r--Documentation/networking/rxrpc.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/networking/rxrpc.txt b/Documentation/networking/rxrpc.txt
index 8c70ba5dee4d..92a3c3bd5ac3 100644
--- a/Documentation/networking/rxrpc.txt
+++ b/Documentation/networking/rxrpc.txt
@@ -818,10 +818,15 @@ The kernel interface functions are as follows:
(*) Send data through a call.
+ typedef void (*rxrpc_notify_end_tx_t)(struct sock *sk,
+ unsigned long user_call_ID,
+ struct sk_buff *skb);
+
int rxrpc_kernel_send_data(struct socket *sock,
struct rxrpc_call *call,
struct msghdr *msg,
- size_t len);
+ size_t len,
+ rxrpc_notify_end_tx_t notify_end_rx);
This is used to supply either the request part of a client call or the
reply part of a server call. msg.msg_iovlen and msg.msg_iov specify the
@@ -832,6 +837,11 @@ The kernel interface functions are as follows:
The msg must not specify a destination address, control data or any flags
other than MSG_MORE. len is the total amount of data to transmit.
+ notify_end_rx can be NULL or it can be used to specify a function to be
+ called when the call changes state to end the Tx phase. This function is
+ called with the call-state spinlock held to prevent any reply or final ACK
+ from being delivered first.
+
(*) Receive data from a call.
int rxrpc_kernel_recv_data(struct socket *sock,