mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-22 04:24:02 +08:00
net: tcp: fix rx timestamp behavior for tcp_recvmsg
The stated intent of the original commit is to is to "return the timestamp corresponding to the highest sequence number data returned." The current implementation returns the timestamp for the last byte of the last fully read skb, which is not necessarily the last byte in the recv buffer. This patch converts behavior to the original definition, and to the behavior of the previous draft versions of commit98aaa913b4
("tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg") which also match this behavior. Fixes:98aaa913b4
("tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg") Co-developed-by: Iris Liu <iris@onechronos.com> Signed-off-by: Iris Liu <iris@onechronos.com> Signed-off-by: Kelly Littlepage <kelly@onechronos.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
dd912306ff
commit
cc4de047b3
@ -2154,13 +2154,15 @@ skip_copy:
|
||||
tp->urg_data = 0;
|
||||
tcp_fast_path_check(sk);
|
||||
}
|
||||
if (used + offset < skb->len)
|
||||
continue;
|
||||
|
||||
if (TCP_SKB_CB(skb)->has_rxtstamp) {
|
||||
tcp_update_recv_tstamps(skb, &tss);
|
||||
cmsg_flags |= 2;
|
||||
}
|
||||
|
||||
if (used + offset < skb->len)
|
||||
continue;
|
||||
|
||||
if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
|
||||
goto found_fin_ok;
|
||||
if (!(flags & MSG_PEEK))
|
||||
|
Loading…
Reference in New Issue
Block a user