tcp: Fix SOF_TIMESTAMPING_RX_HARDWARE to use the latest timestamp during TCP coalescing
Subsystems (3)
PATCH 1/1 tcp: Fix SOF_TIMESTAMPING_RX_HARDWARE to use the latest timestamp during TCP coalescing
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 <[email protected]>
--- net/ipv4/tcp_input.c | 1 + 1 file changed, 1 insertion(+)
net/ipv4/tcp_input.c +1 -0
@@ -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;
Signature · 1 line
2.18.1
Quoted 15 lines · Stephen Mallon
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 <[email protected]>--- net/ipv4/tcp_input.c | 1 + 1 file changed, 1 insertion(+)net/ipv4/tcp_input.c +0
-0
net/ipv4/tcp_input.c static bool tcp_try_coalesce(struct sock *sk, · line 4369
Quoted 7 lines
net/ipv4/tcp_input.c +1
-0@@ -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;
SGTM, thanks !
Signed-off-by Eric Dumazet <[email protected]>