Sending empty segment upon receiving partial ACK

jaeyong yoo <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <CANud0THEOnkWbuOn413AV_auSrY7-SysXThrTyigZMxujEdqEg@mail.gmail.com>
Hi freebsd-net,

I am observing somewhat strange pcap behavior.
Scenario:
   A --> B
A is the only sender of the data and B is the only receiver. Note that
we use PRR.
When B is sending partial ACKs to A, there are cases when A sends out
just an empty segment with the same sequence number to B. Which seems
to be pure overhead.

After digging through the code, I think this could be triggered by the
following sequence:

1. https://github.com/freebsd/freebsd-src/blob/main/sys/netinet/tcp_input.c#L2892
during prr-partial ack processing, it calls tcp_output with ACKNOW flag.

2.https://github.com/freebsd/freebsd-src/blob/main/sys/netinet/tcp_output.c#L415
in tcp_output, it determines "len" how much to send and when ACKed
bytes in partial ack is small enough, this "len" becomes zero.

3. https://github.com/freebsd/freebsd-src/blob/main/sys/netinet/tcp_output.c#L702
As the flag is set to "ACKNOW", with zero length, it anyway sends out
a segment with 0 length.

My question is, is there some check before sending out like checking
if the length is zero?


Thanks,
Jaeyong
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.