In tcp_do_segment():

                /*
                 * If the congestion window was inflated to account
                 * for the other side's cached packets, retract it.
                 */
                if (IN_FASTRECOVERY(tp->t_flags)) {
                        if (SEQ_LT(th->th_ack, tp->snd_recover)) {
                                if (tp->t_flags & TF_SACK_PERMIT)
                                        tcp_sack_partialack(tp, th); 
                                else
                                        tcp_newreno_partial_ack(tp, th); 
                        } else 
                                cc_post_recovery(tp, th); 
                }

Here, if we get an ack that marks recovery from loss i.e. >=
snd_recovery, we call cc_post_recovery() which in-turn calls CC specific
post_recovery routine. But we don't reset TF_FASTRECOVERY |
TF_CONGRECOVERY flags by calling EXIT_RECOVERY() 

Later in the code we do this check again in 'process_ACK:'

                /* XXXLAS: Can this be moved up into cc_post_recovery? */
                if (IN_RECOVERY(tp->t_flags) &&
                    SEQ_GEQ(th->th_ack, tp->snd_recover)) {
                        EXIT_RECOVERY(tp->t_flags);
                }

And as it can be seen, Lawrence marked it as something that could
possibly be done here and at the end of cc_post_recovery(). 

So, should we do it? i.e call EXIT_RECOVERY() at the end of
cc_post_recovery() and remove the block from 'process_ACK' section? or
there is something subtle I am not seeing?

Cheers,
Hiren

Attachment: pgpEoVALIa6UV.pgp
Description: PGP signature

Reply via email to