]> git.baikalelectronics.ru Git - kernel.git/commit
net: tcp: fix rx timestamp behavior for tcp_recvmsg
authorKelly Littlepage <kelly@onechronos.com>
Fri, 8 May 2020 19:58:46 +0000 (19:58 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 May 2020 23:09:22 +0000 (16:09 -0700)
commitea692b79eac1e125a0ebd301e161737bbf0aaf6b
tree9186f31adaac25603b71240bec756b5cda7cb999
parentf95a3909c37a3cf34902ce26c4e255d455e5379f
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 commit c40f4c4c8dec ("tcp: Extend
SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg") which also match this
behavior.

Fixes: c40f4c4c8dec ("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>
net/ipv4/tcp.c