In article <local.mail.freebsd-net/[EMAIL PROTECTED]> you 
write:
><<On Thu, 25 Jan 2001 00:25:10 -0800, jayanth <[EMAIL PROTECTED]> said:
>
>> could you test this patch and compare the results.
>> By generating an ACK for every segment with the TH_PSH flag set
>> I found a significant increase in throughput.
>
>I don't think this is right.
>
>I think what we want to do is:
>
>       if (callout_pending(tp->tt_delack)) {
>               callout_stop(tp->tt_delack);
>               tp->t_flags |= TF_ACKNOW;
>       } else
>               callout_reset(...)

I'm not sure this is required.  Expanding the context of the area in
question:

                        /*
                         * Add data to socket buffer.
                         */
                        m_adj(m, drop_hdrlen);  /* delayed header drop */
                        sbappend(&so->so_rcv, m);
                        sorwakeup(so);
                        if (tcp_delack_enabled) {
                                callout_reset(tp->tt_delack, tcp_delacktime,
                                    tcp_timer_delack, tp);
                        } else {
                                tp->t_flags |= TF_ACKNOW;
                                tcp_output(tp);
                        }
                        return;

>From the bottom portion of tcp_output():

        tp->last_ack_sent = tp->rcv_nxt;
        tp->t_flags &= ~TF_ACKNOW;
        if (tcp_delack_enabled)
                callout_stop(tp->tt_delack);


So simply setting TF_ACKNOW and calling tcp_output should be sufficient;
if there is a pending delack timer it will get turned off when the ACK 
is actually sent.

I think that jayanth's patch is correct, although I slightly dislike 
tying it to the PSH flag - not all implementations actually set this.
However, it is better than the lower bound of acking every incoming 
data packet.
--
Jonathan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to