Exiting from loss recovery

hiren panchasara hiren at strugglingcoder.info
Fri Oct 7 00:22:12 UTC 2016

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); 
                                        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 |

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)) {

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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 603 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-transport/attachments/20161006/b6e51ae0/attachment.sig>

More information about the freebsd-transport mailing list