<<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(...)

This has the effect of ACKing every other packet.  This should
probably be encapsulated in a macro:

#define MAYBE_DELAYED_ACK(tp)                                   \
        do {                                                    \
                if (tcp_delack_enabled) {                       \
                        if (callout_pending(tp->tt_delack)) {   \
                                callout_stop(tp->tt_delack);    \
                                tp->t_flags |= TF_ACKNOW;       \
                        } else                                  \
                                callout_reset(tp->tt_delack,    \
                                    tcp_delacktime,             \
                                    tcp_timer_delack, tp);      \
                } else                                          \
                        tp->t_flags |= TF_ACKNOW;               \
        while (0)

(It may be possible to eliminate the callout_stop() call and one of
the `if' statements.)

-GAWollman



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

Reply via email to