From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
Marc Dionne <marc.dionne@auristor.com>,
Yunsheng Lin <linyunsheng@huawei.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 02/39] rxrpc: Fix handling of received connection abort
Date: Wed, 4 Dec 2024 07:46:30 +0000 [thread overview]
Message-ID: <20241204074710.990092-3-dhowells@redhat.com> (raw)
In-Reply-To: <20241204074710.990092-1-dhowells@redhat.com>
Fix the handling of a connection abort that we've received. Though the
abort is at the connection level, it needs propagating to the calls on that
connection. Whilst the propagation bit is performed, the calls aren't then
woken up to go and process their termination, and as no further input is
forthcoming, they just hang.
Also add some tracing for the logging of connection aborts.
Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
---
include/trace/events/rxrpc.h | 25 +++++++++++++++++++++++++
net/rxrpc/conn_event.c | 12 ++++++++----
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index d03e0bd8c028..27c23873c881 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -117,6 +117,7 @@
#define rxrpc_call_poke_traces \
EM(rxrpc_call_poke_abort, "Abort") \
EM(rxrpc_call_poke_complete, "Compl") \
+ EM(rxrpc_call_poke_conn_abort, "Conn-abort") \
EM(rxrpc_call_poke_error, "Error") \
EM(rxrpc_call_poke_idle, "Idle") \
EM(rxrpc_call_poke_set_timeout, "Set-timo") \
@@ -282,6 +283,7 @@
EM(rxrpc_call_see_activate_client, "SEE act-clnt") \
EM(rxrpc_call_see_connect_failed, "SEE con-fail") \
EM(rxrpc_call_see_connected, "SEE connect ") \
+ EM(rxrpc_call_see_conn_abort, "SEE conn-abt") \
EM(rxrpc_call_see_disconnected, "SEE disconn ") \
EM(rxrpc_call_see_distribute_error, "SEE dist-err") \
EM(rxrpc_call_see_input, "SEE input ") \
@@ -981,6 +983,29 @@ TRACE_EVENT(rxrpc_rx_abort,
__entry->abort_code)
);
+TRACE_EVENT(rxrpc_rx_conn_abort,
+ TP_PROTO(const struct rxrpc_connection *conn, const struct sk_buff *skb),
+
+ TP_ARGS(conn, skb),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, conn)
+ __field(rxrpc_serial_t, serial)
+ __field(u32, abort_code)
+ ),
+
+ TP_fast_assign(
+ __entry->conn = conn->debug_id;
+ __entry->serial = rxrpc_skb(skb)->hdr.serial;
+ __entry->abort_code = skb->priority;
+ ),
+
+ TP_printk("C=%08x ABORT %08x ac=%d",
+ __entry->conn,
+ __entry->serial,
+ __entry->abort_code)
+ );
+
TRACE_EVENT(rxrpc_rx_challenge,
TP_PROTO(struct rxrpc_connection *conn, rxrpc_serial_t serial,
u32 version, u32 nonce, u32 min_level),
diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c
index 598b4ee389fc..2a1396cd892f 100644
--- a/net/rxrpc/conn_event.c
+++ b/net/rxrpc/conn_event.c
@@ -63,11 +63,12 @@ int rxrpc_abort_conn(struct rxrpc_connection *conn, struct sk_buff *skb,
/*
* Mark a connection as being remotely aborted.
*/
-static bool rxrpc_input_conn_abort(struct rxrpc_connection *conn,
+static void rxrpc_input_conn_abort(struct rxrpc_connection *conn,
struct sk_buff *skb)
{
- return rxrpc_set_conn_aborted(conn, skb, skb->priority, -ECONNABORTED,
- RXRPC_CALL_REMOTELY_ABORTED);
+ trace_rxrpc_rx_conn_abort(conn, skb);
+ rxrpc_set_conn_aborted(conn, skb, skb->priority, -ECONNABORTED,
+ RXRPC_CALL_REMOTELY_ABORTED);
}
/*
@@ -202,11 +203,14 @@ static void rxrpc_abort_calls(struct rxrpc_connection *conn)
for (i = 0; i < RXRPC_MAXCALLS; i++) {
call = conn->channels[i].call;
- if (call)
+ if (call) {
+ rxrpc_see_call(call, rxrpc_call_see_conn_abort);
rxrpc_set_call_completion(call,
conn->completion,
conn->abort_code,
conn->error);
+ rxrpc_poke_call(call, rxrpc_call_poke_conn_abort);
+ }
}
_leave("");
next prev parent reply other threads:[~2024-12-04 7:47 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 7:46 [PATCH net-next v2 00/39] rxrpc: Implement jumbo DATA transmission and RACK-TLP David Howells
2024-12-04 7:46 ` [PATCH net-next v2 01/39] ktime: Add us_to_ktime() David Howells
2024-12-04 7:46 ` David Howells [this message]
2024-12-04 7:46 ` [PATCH net-next v2 03/39] rxrpc: Use umin() and umax() rather than min_t()/max_t() where possible David Howells
2024-12-04 7:46 ` [PATCH net-next v2 04/39] rxrpc: Clean up Tx header flags generation handling David Howells
2024-12-04 7:46 ` [PATCH net-next v2 05/39] rxrpc: Don't set the MORE-PACKETS rxrpc wire header flag David Howells
2024-12-04 7:46 ` [PATCH net-next v2 06/39] rxrpc: Show stats counter for received reason-0 ACKs David Howells
2024-12-04 7:46 ` [PATCH net-next v2 07/39] rxrpc: Request an ACK on impending Tx stall David Howells
2024-12-04 7:46 ` [PATCH net-next v2 08/39] rxrpc: Use a large kvec[] in rxrpc_local rather than every rxrpc_txbuf David Howells
2024-12-04 7:46 ` [PATCH net-next v2 09/39] rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899) David Howells
2024-12-04 7:46 ` [PATCH net-next v2 10/39] rxrpc: Separate the packet length from the data length in rxrpc_txbuf David Howells
2024-12-04 7:46 ` [PATCH net-next v2 11/39] rxrpc: Prepare to be able to send jumbo DATA packets David Howells
2024-12-04 7:46 ` [PATCH net-next v2 12/39] rxrpc: Add a tracepoint to show variables pertinent to jumbo packet size David Howells
2024-12-04 7:46 ` [PATCH net-next v2 13/39] rxrpc: Fix CPU time starvation in I/O thread David Howells
2024-12-04 7:46 ` [PATCH net-next v2 14/39] rxrpc: Fix injection of packet loss David Howells
2024-12-04 7:46 ` [PATCH net-next v2 15/39] rxrpc: Only set DF=1 on initial DATA transmission David Howells
2024-12-04 7:46 ` [PATCH net-next v2 16/39] rxrpc: Timestamp DATA packets before transmitting them David Howells
2024-12-04 7:46 ` [PATCH net-next v2 17/39] rxrpc: Don't need barrier for ->tx_bottom and ->acks_hard_ack David Howells
2024-12-04 7:46 ` [PATCH net-next v2 18/39] rxrpc: Implement progressive transmission queue struct David Howells
2024-12-04 7:46 ` [PATCH net-next v2 19/39] rxrpc: call->acks_hard_ack is now the same call->tx_bottom, so remove it David Howells
2024-12-04 7:46 ` [PATCH net-next v2 20/39] rxrpc: Replace call->acks_first_seq with tracking of the hard ACK point David Howells
2024-12-04 7:46 ` [PATCH net-next v2 21/39] rxrpc: Display stats about jumbo packets transmitted and received David Howells
2024-12-04 7:46 ` [PATCH net-next v2 22/39] rxrpc: Adjust names and types of congestion-related fields David Howells
2024-12-04 7:46 ` [PATCH net-next v2 23/39] rxrpc: Use the new rxrpc_tx_queue struct to more efficiently process ACKs David Howells
2024-12-04 7:46 ` [PATCH net-next v2 24/39] rxrpc: Store the DATA serial in the txqueue and use this in RTT calc David Howells
2024-12-04 7:46 ` [PATCH net-next v2 25/39] rxrpc: Don't use received skbuff timestamps David Howells
2024-12-04 7:46 ` [PATCH net-next v2 26/39] rxrpc: Generate rtt_min David Howells
2024-12-04 7:46 ` [PATCH net-next v2 27/39] rxrpc: Adjust the rxrpc_rtt_rx tracepoint David Howells
2024-12-04 7:46 ` [PATCH net-next v2 28/39] rxrpc: Display userStatus in rxrpc_rx_ack trace David Howells
2024-12-04 7:46 ` [PATCH net-next v2 29/39] rxrpc: Fix the calculation and use of RTO David Howells
2024-12-04 7:46 ` [PATCH net-next v2 30/39] rxrpc: Fix initial resend timeout David Howells
2024-12-04 7:46 ` [PATCH net-next v2 31/39] rxrpc: Send jumbo DATA packets David Howells
2024-12-04 7:47 ` [PATCH net-next v2 32/39] rxrpc: Don't allocate a txbuf for an ACK transmission David Howells
2024-12-04 7:47 ` [PATCH net-next v2 33/39] rxrpc: Use irq-disabling spinlocks between app and I/O thread David Howells
2024-12-04 7:47 ` [PATCH net-next v2 34/39] rxrpc: Tidy up the ACK parsing a bit David Howells
2024-12-04 7:47 ` [PATCH net-next v2 35/39] rxrpc: Add a reason indicator to the tx_data tracepoint David Howells
2024-12-04 7:47 ` [PATCH net-next v2 36/39] rxrpc: Add a reason indicator to the tx_ack tracepoint David Howells
2024-12-04 7:47 ` [PATCH net-next v2 37/39] rxrpc: Manage RTT per-call rather than per-peer David Howells
2024-12-04 7:47 ` [PATCH net-next v2 38/39] rxrpc: Fix request for an ACK when cwnd is minimum David Howells
2024-12-04 7:47 ` [PATCH net-next v2 39/39] rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985] David Howells
2024-12-09 22:10 ` [PATCH net-next v2 00/39] rxrpc: Implement jumbo DATA transmission and RACK-TLP patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241204074710.990092-3-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox