Changeset 4763

Show
Ignore:
Timestamp:
04/07/10 01:23:34 (4 years ago)
Author:
soohyunc
Message:

Subsequent to the Revision 4762... (to prevent from segfault)

had to consider all re-ordering cases (e.g., packet reordering, ack reordering,
depricated ack reception)

i.e., if the above cases occurred before we see the first packet loss, then we
do not have any history to go back. therefore, we increase cwnd to clock a
packet out.

Location:
vic/branches/cc/cc
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/cc/cc/tfwc_sndr.cpp

    r4762 r4763  
    234234                  revert = revert_interval(jacked_); 
    235235                  // then, update cwnd 
    236                   cwnd_in_packets(revert); 
     236                  window_in_packets(revert); 
    237237                  print_cwnd(); 
    238238                  // finally, reset variables 
     
    245245                else if(out_of_ack(jacked_, seqvec_, num_seqvec_)) { 
    246246                  debug_msg("warning: this ack(%d) itself is out-of-order!\n",jacked_); 
     247                  if(!is_tfwc_on_) 
    247248                  // if the disorder is beyond 3 dupack rule, 
    248249                  // revert to the earlier history 
     
    250251                  revert = revert_interval(jacked_); 
    251252                  // then, update cwnd 
    252                   cwnd_in_packets(revert); 
     253                  window_in_packets(revert); 
    253254                  print_cwnd(); 
    254255                  // finally, reset variables 
     
    309310        // finally, we only need to clock packets out. 
    310311        // (i.e., do NOT update cwnd and RTT) 
    311         if(reorder_ && is_tfwc_on_) { 
     312        if(reorder_) { 
    312313                // revert to the earlier history if the disorder is beyond 3 dupack rule 
    313314                if (shift >= DUPACKS) 
    314315                revert = revert_interval(jacked_); 
    315316                // then, update cwnd 
    316                 cwnd_in_packets(revert); 
     317                window_in_packets(revert); 
    317318                print_cwnd(); 
    318319                // finally, reset variables 
     
    321322        } 
    322323 
    323         // TFWC is not turned on (i.e., no packet loss yet) 
    324         if(!is_tfwc_on_)  
    325                 tcp_like_increase(); 
    326         // TFWC is turned on, so compute congestion window 
    327         else 
    328                 cwnd_in_packets(revert); 
    329  
     324        // TFWC congestion window in packets 
     325        window_in_packets(revert); 
    330326        print_cwnd(); 
    331327 
     
    365361  return; 
    366362} 
     363 
     364/* 
     365 * TFWC congestion window in packets 
     366 */ 
     367void TfwcSndr::window_in_packets(bool revert) { 
     368        // TFWC is not turned on (i.e., no packet loss yet) 
     369        if(!is_tfwc_on_)  
     370                tcp_like_increase(); 
     371        // TFWC is turned on, so compute congestion window 
     372        else 
     373                cwnd_in_packets(revert); 
     374}  
    367375 
    368376/* 
  • vic/branches/cc/cc/tfwc_sndr.h

    r4762 r4763  
    187187        bool detect_loss(); 
    188188 
    189         // TFWC congestion window 
     189        // TFWC congestion window in packets 
     190        void window_in_packets(bool revert); 
     191        void cwnd_in_packets(bool revert); 
     192        // TFWC congestion window in bytes 
    190193        void cwnd_in_bytes(); 
    191         void cwnd_in_packets(bool revert); 
    192194 
    193195        // calcuate average loss interval