tcp: autocork: take MSG_EOR hint into consideration
authorEric Dumazet <edumazet@google.com>
Wed, 9 Mar 2022 05:47:06 +0000 (21:47 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Mar 2022 04:05:20 +0000 (20:05 -0800)
commitb0de0cf4f57cbac41ef7fa382bcaef83288af1e7
treec2aa3e39df6021c91254028129b59f0f4920cc02
parent30c5601fbf353a40115564e1304a1870978fda29
tcp: autocork: take MSG_EOR hint into consideration

tcp_should_autocork() is evaluating if it makes senses
to not immediately send current skb, hoping that
user space will add more payload on it by the
time TCP stack reacts to upcoming TX completions.

If current skb got MSG_EOR mark, then we know
that no further data will be added, it is therefore
futile to wait.

SOF_TIMESTAMPING_TX_ACK will become a bit more accurate,
if prior packets are still in qdisc/device queues.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Link: https://lore.kernel.org/r/20220309054706.2857266-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c