summaryrefslogtreecommitdiffstats
path: root/include/net/af_rxrpc.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-04-07 18:23:30 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-11 21:34:40 +0200
commitdc44b3a09aec9ac57c1e7410677c87c0e6453624 (patch)
treef1d8e6b201aec9bad334ab6e9df06ccce6bdfd36 /include/net/af_rxrpc.h
parentrxrpc: Static arrays of strings should be const char *const[] (diff)
downloadlinux-dc44b3a09aec9ac57c1e7410677c87c0e6453624.tar.xz
linux-dc44b3a09aec9ac57c1e7410677c87c0e6453624.zip
rxrpc: Differentiate local and remote abort codes in structs
In the rxrpc_connection and rxrpc_call structs, there's one field to hold the abort code, no matter whether that value was generated locally to be sent or was received from the peer via an abort packet. Split the abort code fields in two for cleanliness sake and add an error field to hold the Linux error number to the rxrpc_call struct too (sometimes this is generated in a context where we can't return it to userspace directly). Furthermore, add a skb mark to indicate a packet that caused a local abort to be generated so that recvmsg() can pick up the correct abort code. A future addition will need to be to indicate to userspace the difference between aborts via a control message. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/af_rxrpc.h')
-rw-r--r--include/net/af_rxrpc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h
index 4fd3e4a2cadd..ac1bc3c49fbd 100644
--- a/include/net/af_rxrpc.h
+++ b/include/net/af_rxrpc.h
@@ -20,11 +20,12 @@ struct rxrpc_call;
/*
* the mark applied to socket buffers that may be intercepted
*/
-enum {
+enum rxrpc_skb_mark {
RXRPC_SKB_MARK_DATA, /* data message */
RXRPC_SKB_MARK_FINAL_ACK, /* final ACK received message */
RXRPC_SKB_MARK_BUSY, /* server busy message */
RXRPC_SKB_MARK_REMOTE_ABORT, /* remote abort message */
+ RXRPC_SKB_MARK_LOCAL_ABORT, /* local abort message */
RXRPC_SKB_MARK_NET_ERROR, /* network error message */
RXRPC_SKB_MARK_LOCAL_ERROR, /* local error message */
RXRPC_SKB_MARK_NEW_CALL, /* local error message */