summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/sendmsg.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-23 08:17:33 -0400
committerDavid Howells <dhowells@redhat.com>2016-09-23 08:17:52 -0400
commitb24d2891cfb0a7975b0039743439c98fe7b7dea7 (patch)
tree0085b06165816601606819a93e416cd35a6f4fa0 /net/rxrpc/sendmsg.c
parente12934d9806e61d2727069cd56757987f3da76aa (diff)
rxrpc: Preset timestamp on Tx sk_buffs
Set the timestamp on sk_buffs holding packets to be transmitted before queueing them because the moment the packet is on the queue it can be seen by the retransmission algorithm - which may see a completely random timestamp. If the retransmission algorithm sees such a timestamp, it may retransmit the packet and, in future, tell the congestion management algorithm that the retransmit timer expired. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/sendmsg.c')
-rw-r--r--net/rxrpc/sendmsg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
index ca7c3be60ad2..ca3811bfbd17 100644
--- a/net/rxrpc/sendmsg.c
+++ b/net/rxrpc/sendmsg.c
@@ -99,6 +99,11 @@ static void rxrpc_queue_packet(struct rxrpc_call *call, struct sk_buff *skb,
99 99
100 ASSERTCMP(seq, ==, call->tx_top + 1); 100 ASSERTCMP(seq, ==, call->tx_top + 1);
101 101
102 /* We have to set the timestamp before queueing as the retransmit
103 * algorithm can see the packet as soon as we queue it.
104 */
105 skb->tstamp = ktime_get_real();
106
102 ix = seq & RXRPC_RXTX_BUFF_MASK; 107 ix = seq & RXRPC_RXTX_BUFF_MASK;
103 rxrpc_get_skb(skb, rxrpc_skb_tx_got); 108 rxrpc_get_skb(skb, rxrpc_skb_tx_got);
104 call->rxtx_annotations[ix] = RXRPC_TX_ANNO_UNACK; 109 call->rxtx_annotations[ix] = RXRPC_TX_ANNO_UNACK;