aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/sendmsg.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-23 12:39:23 +0100
committerDavid Howells <dhowells@redhat.com>2016-09-23 14:05:12 +0100
commitdfc3da4404ad1ec42a0a649a4ffa2b0f37e80352 (patch)
treea2dadd235014eaa65bca49d85c89c2678bf2391f /net/rxrpc/sendmsg.c
parentrxrpc: Use before_eq() and friends to compare serial numbers (diff)
downloadlinux-dev-dfc3da4404ad1ec42a0a649a4ffa2b0f37e80352.tar.xz
linux-dev-dfc3da4404ad1ec42a0a649a4ffa2b0f37e80352.zip
rxrpc: Need to start the resend timer on initial transmission
When a DATA packet has its initial transmission, we may need to start or adjust the resend timer. Without this we end up relying on being sent a NACK to initiate the resend. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to '')
-rw-r--r--net/rxrpc/sendmsg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
index ca3811bfbd17..7cb34b2dfba9 100644
--- a/net/rxrpc/sendmsg.c
+++ b/net/rxrpc/sendmsg.c
@@ -146,6 +146,15 @@ static void rxrpc_queue_packet(struct rxrpc_call *call, struct sk_buff *skb,
if (ret < 0) {
_debug("need instant resend %d", ret);
rxrpc_instant_resend(call, ix);
+ } else {
+ unsigned long resend_at;
+
+ resend_at = jiffies + msecs_to_jiffies(rxrpc_resend_timeout);
+
+ if (time_before(resend_at, call->resend_at)) {
+ call->resend_at = resend_at;
+ rxrpc_set_timer(call);
+ }
}
rxrpc_free_skb(skb, rxrpc_skb_tx_freed);