]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
tcp: Fix SOF_TIMESTAMPING_RX_HARDWARE to use the latest timestamp during TCP coalescing
authorStephen Mallon <stephen.mallon@sydney.edu.au>
Tue, 20 Nov 2018 08:15:02 +0000 (19:15 +1100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Nov 2018 18:32:11 +0000 (10:32 -0800)
During tcp coalescing ensure that the skb hardware timestamp refers to the
highest sequence number data.
Previously only the software timestamp was updated during coalescing.

Signed-off-by: Stephen Mallon <stephen.mallon@sydney.edu.au>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c

index 2868ef28ce52179b3c5874e749b680ffbdc0521a..e695584bb33fb13cb6ce8a1248f96a9baa1faa96 100644 (file)
@@ -4363,6 +4363,7 @@ static bool tcp_try_coalesce(struct sock *sk,
        if (TCP_SKB_CB(from)->has_rxtstamp) {
                TCP_SKB_CB(to)->has_rxtstamp = true;
                to->tstamp = from->tstamp;
+               skb_hwtstamps(to)->hwtstamp = skb_hwtstamps(from)->hwtstamp;
        }
 
        return true;