* Question about TCP delayed-ack and PUSH flag behavior
@ 2025-02-14 17:03 제임스
2025-02-14 17:12 ` Willy Tarreau
0 siblings, 1 reply; 4+ messages in thread
From: 제임스 @ 2025-02-14 17:03 UTC (permalink / raw)
To: netdev
Hi netdev,
When tcp stack receives a segment with PUSH flag set, does the stack
immediately send out for the corresponding ACK with ignoring delay-ack
timer?
Or regardless of the PUSH flag, delay-ack is always enforced?
Thanks,
JY
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about TCP delayed-ack and PUSH flag behavior
2025-02-14 17:03 Question about TCP delayed-ack and PUSH flag behavior 제임스
@ 2025-02-14 17:12 ` Willy Tarreau
2025-02-14 17:58 ` 제임스
0 siblings, 1 reply; 4+ messages in thread
From: Willy Tarreau @ 2025-02-14 17:12 UTC (permalink / raw)
To: ???; +Cc: netdev
On Fri, Feb 14, 2025 at 12:03:17PM -0500, ??? wrote:
> Hi netdev,
>
> When tcp stack receives a segment with PUSH flag set, does the stack
> immediately send out for the corresponding ACK with ignoring delay-ack
> timer?
> Or regardless of the PUSH flag, delay-ack is always enforced?
It depends, it's possible for the application to force a delayed ack
by setting TCP_QUICKACK to zero. This is convenient for web servers
that know they respond quickly and can merge this ack with the
response to save one packet.
Willy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about TCP delayed-ack and PUSH flag behavior
2025-02-14 17:12 ` Willy Tarreau
@ 2025-02-14 17:58 ` 제임스
2025-02-15 0:16 ` Jason Xing
0 siblings, 1 reply; 4+ messages in thread
From: 제임스 @ 2025-02-14 17:58 UTC (permalink / raw)
To: Willy Tarreau; +Cc: netdev
2025년 2월 14일 (금) 오후 12:12, Willy Tarreau <w@1wt.eu>님이 작성:
>
> On Fri, Feb 14, 2025 at 12:03:17PM -0500, ??? wrote:
> > Hi netdev,
> >
> > When tcp stack receives a segment with PUSH flag set, does the stack
> > immediately send out for the corresponding ACK with ignoring delay-ack
> > timer?
> > Or regardless of the PUSH flag, delay-ack is always enforced?
>
> It depends, it's possible for the application to force a delayed ack
> by setting TCP_QUICKACK to zero. This is convenient for web servers
> that know they respond quickly and can merge this ack with the
> response to save one packet.
Thanks but my question is about the kernel's default behavior.
It sounds like there is no interaction between PUSH and delayed-ack,
and it should be handled by application scope.
Can someone confirm my understanding?
JY
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about TCP delayed-ack and PUSH flag behavior
2025-02-14 17:58 ` 제임스
@ 2025-02-15 0:16 ` Jason Xing
0 siblings, 0 replies; 4+ messages in thread
From: Jason Xing @ 2025-02-15 0:16 UTC (permalink / raw)
To: 제임스; +Cc: Willy Tarreau, netdev
On Sat, Feb 15, 2025 at 2:00 AM 제임스 <jaymaacton@gmail.com> wrote:
>
> 2025년 2월 14일 (금) 오후 12:12, Willy Tarreau <w@1wt.eu>님이 작성:
> >
> > On Fri, Feb 14, 2025 at 12:03:17PM -0500, ??? wrote:
> > > Hi netdev,
> > >
> > > When tcp stack receives a segment with PUSH flag set, does the stack
> > > immediately send out for the corresponding ACK with ignoring delay-ack
> > > timer?
> > > Or regardless of the PUSH flag, delay-ack is always enforced?
> >
> > It depends, it's possible for the application to force a delayed ack
> > by setting TCP_QUICKACK to zero. This is convenient for web servers
> > that know they respond quickly and can merge this ack with the
> > response to save one packet.
>
> Thanks but my question is about the kernel's default behavior.
> It sounds like there is no interaction between PUSH and delayed-ack,
> and it should be handled by application scope.
> Can someone confirm my understanding?
I think there are two patches that may arouse your interests:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4720852ed9afb1c5ab84e96135cb5b73d5afde6f
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1ef9696c909060ccdae3ade245ca88692b49285b
As you may conclude from the above link, no direct interaction between
PSH flag and delayed-ack, but we do handle the !ping-pong case. I
guess that you may compare the implementation with RFC 9293[1] and
find the difference?
[1]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.9.1.3
Thanks,
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-15 0:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 17:03 Question about TCP delayed-ack and PUSH flag behavior 제임스
2025-02-14 17:12 ` Willy Tarreau
2025-02-14 17:58 ` 제임스
2025-02-15 0:16 ` Jason Xing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).