Subject: Re: some sack fixes
To: None <tech-net@netbsd.org>
From: Noritoshi Demizu <demizu@dd.iij4u.or.jp>
List: tech-net
Date: 03/15/2005 10:42:41
> > I'm unsure about "send SACKs regardless of TF_ACKNOW".  Is there any
> > specific reason why you want to do this?  It's implicit that we'll
> > be sending an ACK back when we have SACK information (as in, we received
> > something out of order so we will be sending a Dup-Ack back), so I
> > guess that the check isn't strictly neccecary, but...
>
> TF_ACKNOW will be cleared once we send an ACK.
> however, we can still need to send (the same) SACK for the next segment.

Let me show a couple of examples.

One example of such "next segment" is a window update.
When read() or recv() is called, tcp_usrreq() is called with PRU_RCVD.
Then it calls tcp_output() without TF_ACKNOW.

Another example is a data segment sent in reverse direction.
When write() or send() is called, tcp_usrreq() is called with PRU_SEND.
Then it calls tcp_output() without TF_ACKNOW.

By the way, I think TCP_SACK_MAX (declared in tcp_var.h) should be 4.

Regards,
Noritoshi Demizu