diff options
author | David Howells <dhowells@redhat.com> | 2018-05-11 00:26:01 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-05-11 00:26:01 +0200 |
commit | 6b47fe1d1ca3aec3a1a8623439c22fbf51016cd8 (patch) | |
tree | 1947f6871f93fe343bea644289b4243519c3ef6f /net/rxrpc/conn_event.c | |
parent | rxrpc: Add a tracepoint to log ICMP/ICMP6 and error messages (diff) | |
download | linux-6b47fe1d1ca3aec3a1a8623439c22fbf51016cd8.tar.xz linux-6b47fe1d1ca3aec3a1a8623439c22fbf51016cd8.zip |
rxrpc: Trace UDP transmission failure
Add a tracepoint to log transmission failure from the UDP transport socket
being used by AF_RXRPC.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_event.c')
-rw-r--r-- | net/rxrpc/conn_event.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c index c717152070df..1350f1be8037 100644 --- a/net/rxrpc/conn_event.c +++ b/net/rxrpc/conn_event.c @@ -40,7 +40,7 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn, } __attribute__((packed)) pkt; struct rxrpc_ackinfo ack_info; size_t len; - int ioc; + int ret, ioc; u32 serial, mtu, call_id, padding; _enter("%d", conn->debug_id); @@ -135,10 +135,13 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn, break; } - kernel_sendmsg(conn->params.local->socket, &msg, iov, ioc, len); + ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, ioc, len); conn->params.peer->last_tx_at = ktime_get_real(); + if (ret < 0) + trace_rxrpc_tx_fail(conn->debug_id, serial, ret, + rxrpc_tx_fail_call_final_resend); + _leave(""); - return; } /* @@ -236,6 +239,8 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn, ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, 2, len); if (ret < 0) { + trace_rxrpc_tx_fail(conn->debug_id, serial, ret, + rxrpc_tx_fail_conn_abort); _debug("sendmsg failed: %d", ret); return -EAGAIN; } |