1. 09 9月, 2008 1 次提交
  2. 04 9月, 2008 2 次提交
    • G
      dccp ccid-3: Preventing Oscillations · a3cbdde8
      Gerrit Renker 提交于
      This implements [RFC 3448, 4.5], which performs congestion avoidance behaviour
      by reducing the transmit rate as the queueing delay (measured in terms of
      long-term RTT) increases.
      
      Oscillation can be turned on/off via a module option (do_osc_prev) and via sysfs
      (using mode 0644), the default is off.
      
      Overflow analysis:
      ------------------
       * oscillation prevention is done after update_x(), so that t_ipi <= 64000;
       * hence the multiplication "t_ipi * sqrt(R_sample)" needs 64 bits;
       * done using u64 for sqrt_sample and explicit typecast of t_ipi;
       * the divisor, R_sqmean, is non-zero because oscillation prevention is first
         called when receiving the second feedback packet, and tfrc_scaled_rtt() > 0.
      
      A detailed discussion of the algorithm (with plots) is on
      http://www.erg.abdn.ac.uk/users/gerrit/dccp/notes/ccid3/sender_notes/oscillation_prevention/
      
      The algorithm has negative side effects:
        * when allowing to decrease t_ipi (leads to a large RTT) and
        * when using it during slow-start;
      both uses are therefore disabled.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      a3cbdde8
    • G
      dccp tfrc/ccid-3: Computing Loss Rate from Loss Event Rate · 535c55df
      Gerrit Renker 提交于
      This adds a function to take care of the following cases occurring in the
      computation of the Loss Rate p:
      
       * 1/(2^32-1) is mapped into 0% as per RFC 4342, 8.5;
       * 1/0        is mapped into the maximum of 100%;
       * we want to avoid that p = 1/x is rounded down to 0 when x is very large,
         since this means accidentally re-entering slow-start (indicated by p==0).
      
      In the last case, the minimum-resolution value of p is returned.
      
      Furthermore, a bug in ccid3_hc_rx_getsockopt is fixed (1/0 was mapped into ~0U),
      which now allows to consistently print the scaled p-values as
      
              printf("Loss Event Rate = %u.%04u %%\n", rx_info.tfrcrx_p / 10000, 
                                                       rx_info.tfrcrx_p % 10000);
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      535c55df
  3. 11 6月, 2008 2 次提交
    • G
      dccp ccid-3: X truncated due to type conversion · 7deb0f85
      Gerrit Renker 提交于
      This fixes a bug in computing the inter-packet-interval t_ipi = s/X: 
      
       scaled_div32(a, b) uses u32 for b, but in "scaled_div32(s, X)" the type of the
       sending rate `X' is u64. Since X is scaled by 2^6, this truncates rates greater
       than 2^26 Bps (~537 Mbps).
      
      Using full 64-bit division now.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      7deb0f85
    • G
      dccp: Fix sparse warnings · 1e2f0e5e
      Gerrit Renker 提交于
      This patch fixes the following sparse warnings:
       * nested min(max()) expression:
         net/dccp/ccids/ccid3.c:91:21: warning: symbol '__x' shadows an earlier one
         net/dccp/ccids/ccid3.c:91:21: warning: symbol '__y' shadows an earlier one
         
       * Declaration of function prototypes in .c instead of .h file, resulting in
         "should it be static?" warnings. 
      
       * Declared "struct dccpw" static (local to dccp_probe).
       
       * Disabled dccp_delayed_ack() - not fully removed due to RFC 4340, 11.3
         ("Receivers SHOULD implement delayed acknowledgement timers ...").
      
       * Used a different local variable name to avoid
         net/dccp/ackvec.c:293:13: warning: symbol 'state' shadows an earlier one
         net/dccp/ackvec.c:238:33: originally declared here
      
       * Removed unused functions `dccp_ackvector_print' and `dccp_ackvec_print'.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      1e2f0e5e
  4. 29 1月, 2008 3 次提交
  5. 12 12月, 2006 1 次提交
    • G
      [DCCP]: Simplify TFRC calculation · d63d8364
      Gerrit Renker 提交于
      In migrating towards using the newer functions scaled_div/scaled_div32
      for TFRC computations mapped from floating-point onto integer arithmetic,
      this completes the last stage of modifications.
      
      In particular, the overflow case for computing X_calc is circumvented by
       * breaking the computation into two stages
       * the first stage, res = (s*1E6)/R, cannot overflow due to use of u64
       * in the second stage, res = (res*1E6)/f, overflow on u32 is avoided due
         to (i) returning UINT_MAX in this case (which is logically appropriate)
         and (ii) issuing a warning message into the system log (since very likely
         there is a problem somewhere else with the parameters)
      
      Lastly, all such scaling operations are now exported into tfrc.h, since
      actually this form of scaled computation is specific to TFRC and not to CCID3.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      d63d8364
  6. 27 8月, 2006 1 次提交
  7. 30 8月, 2005 1 次提交