Thread (8 messages) 8 messages, 3 authors, 2022-05-22

[PATCH net 2/5] rxrpc: Don't try to resend the request if we're receiving the reply

flat view
STALE1607d SUPERSEDED

From: David Howells <dhowells@redhat.com>
Date: 2022-05-21 08:03:29
Also in: lkml
Subsystem: networking [general], rxrpc sockets (af_rxrpc), the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Howells, Marc Dionne, Linus Torvalds

Revision v1 of 30 in this series.

Revisions (30)
  1. v1
  2. v1
  3. v1
  4. v1 current
  5. v1
  6. v3 [diff vs current]
  7. v1
  8. v1
  9. v1
  10. v1
  11. v1
  12. v2 [diff vs current]
  13. v1
  14. v2 [diff vs current]
  15. v1
  16. v2 [diff vs current]
  17. v3 [diff vs current]
  18. v4 [diff vs current]
  19. v5 [diff vs current]
  20. v1
  21. v2 [diff vs current]
  22. v1
  23. v1
  24. v1
  25. v2 [diff vs current]
  26. v3 [diff vs current]
  27. v9 [diff vs current]
  28. v10 [diff vs current]
  29. v11 [diff vs current]
  30. v12 [diff vs current]
rxrpc has a timer to trigger resending of unacked data packets in a call.
This is not cancelled when a client call switches to the receive phase on
the basis that most calls don't last long enough for it to ever expire.
However, if it *does* expire after we've started to receive the reply, we
shouldn't then go into trying to retransmit or pinging the server to find
out if an ack got lost.

Fix this by skipping the resend code if we're into receiving the reply to a
client call.

Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
---

 net/rxrpc/call_event.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index 22e05de5d1ca..31761084a76f 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -406,7 +406,8 @@ void rxrpc_process_call(struct work_struct *work)
 		goto recheck_state;
 	}
 
-	if (test_and_clear_bit(RXRPC_CALL_EV_RESEND, &call->events)) {
+	if (test_and_clear_bit(RXRPC_CALL_EV_RESEND, &call->events) &&
+	    call->state != RXRPC_CALL_CLIENT_RECV_REPLY) {
 		rxrpc_resend(call, now);
 		goto recheck_state;
 	}

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help