An error occurred fetching the project authors.
  1. 11 Dec, 2006 10 commits
  2. 07 Dec, 2006 1 commit
  3. 03 Dec, 2006 23 commits
    • Gerrit Renker's avatar
      [DCCP] ccid3: Deprecate TFRC_SMALLEST_P · 44158306
      Gerrit Renker authored
       This patch deprecates the existing use of an arbitrary value TFRC_SMALLEST_P
       for low-threshold values of p. This avoids masking low-resolution errors.
       Instead, the code now checks against real boundaries (implemented by preceding
       patch) and provides warnings whenever a real value falls below the threshold.
      
       If such messages are observed, it is a better solution to take this as an
       indication that the lookup table needs to be re-engineered.
      
      Changelog:
      ----------
       This patch
         * makes handling all TFRC resolution errors local to the TFRC library
      
         * removes unnecessary test whether X_calc is 'infinity' due to p==0 -- this
           condition is already caught by tfrc_calc_x()
      
         * removes setting ccid3hctx_p = TFRC_SMALLEST_P in ccid3_hc_tx_packet_recv
           since this is now done by the TFRC library
      
         * updates BUG_ON test in ccid3_hc_tx_no_feedback_timer to take into account
           that p now is either 0 (and then X_calc is irrelevant), or it is > 0; since
           the handling of TFRC_SMALLEST_P is now taken care of in the tfrc library
      
      Justification:
      --------------
       The TFRC code uses a lookup table which has a bounded resolution.
       The lowest possible value of the loss event rate `p' which can be
       resolved is currently 0.0001.  Substituting this lower threshold for
       p when p is less than 0.0001 results in a huge, exponentially-growing
       error.  The error can be computed by the following formula:
      
          (f(0.0001) - f(p))/f(p) * 100      for p < 0.0001
      
       Currently the solution is to use an (arbitrary) value
           TFRC_SMALLEST_P  =   40 * 1E-6   =   0.00004
       and to consider all values below this value as `virtually zero'.  Due to
       the exponentially growing resolution error, this is not a good idea, since
       it hides the fact that the table can not resolve practically occurring cases.
       Already at p == TFRC_SMALLEST_P, the error is as high as 58.19%!
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      44158306
    • Gerrit Renker's avatar
      [DCCP] ccid3: Fix warning message about illegal ACK · 26af3072
      Gerrit Renker authored
      This avoids a (harmless) warning message being printed at the DCCP server
      (the receiver of a DCCP half connection).
      
      Incoming packets are both directed to
      
       * ccid_hc_rx_packet_recv() for the server half
       * ccid_hc_tx_packet_recv() for the client half
      
      The message gets printed since on a server the client half is currently not
      sending data packets.
      This is resolved for the moment by checking the DCCP-role first. In future
      times (bidirectional DCCP connections), this test may have to be more
      sophisticated.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      26af3072
    • Gerrit Renker's avatar
      [DCCP] ccid3: Fix bug in calculation of send rate · 5c3fbb6a
      Gerrit Renker authored
      The main object of this patch is the following bug:
       ==> In ccid3_hc_tx_packet_recv, the parameters p and X_recv were updated
           _after_ the send rate was calculated. This is clearly an error and is
           resolved by re-ordering statements.
      
      In addition,
        * r_sample is converted from u32 to long to check whether the time difference
          was negative (it would otherwise be converted to a large u32 value)
        * protection against RTT=0 (this is possible) is provided in a further patch
        * t_elapsed is also converted to long, to match the type of r_sample
        * adds a a more debugging information regarding current send rates
        * various trivial comment/documentation updates
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      5c3fbb6a
    • Gerrit Renker's avatar
      [DCCP]: Fix BUG in retransmission delay calculation · 76d12777
      Gerrit Renker authored
      This bug resulted in ccid3_hc_tx_send_packet returning negative
      delay values, which in turn triggered silently dequeueing packets in
      dccp_write_xmit. As a result, only a few out of the submitted packets made
      it at all onto the network.  Occasionally, when dccp_wait_for_ccid was
      involved, this also triggered a bug warning since ccid3_hc_tx_send_packet
      returned a negative value (which in reality was a negative delay value).
      
      The cause for this bug lies in the comparison
      
       if (delay >= hctx->ccid3hctx_delta)
      	return delay / 1000L;
      
      The type of `delay' is `long', that of ccid3hctx_delta is `u32'. When comparing
      negative long values against u32 values, the test returned `true' whenever delay
      was smaller than 0 (meaning the packet was overdue to send).
      
      The fix is by casting, subtracting, and then testing the difference with
      regard to 0.
      
      This has been tested and shown to work.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      76d12777
    • Gerrit Renker's avatar
      [DCCP]: Use higher RTO default for CCID3 · 8a508ac2
      Gerrit Renker authored
      The TFRC nofeedback timer normally expires after the maximum of 4
      RTTs and twice the current send interval (RFC 3448, 4.3). On LANs
      with a small RTT this can mean a high processing load and reduced
      performance, since then the nofeedback timer is triggered very
      frequently.
      
      This patch provides a configuration option to set the bound for the
      nofeedback timer, using as default 100 milliseconds.
      
      By setting the configuration option to 0, strict RFC 3448 behaviour
      can be enforced for the nofeedback timer.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      8a508ac2
    • Gerrit Renker's avatar
      [DCCP]: Use `unsigned' for packet lengths · 6b57c93d
      Gerrit Renker authored
      This patch implements a suggestion by Ian McDonald and
      
       1) Avoids tests against negative packet lengths by using unsigned int
          for packet payload lengths in the CCID send_packet()/packet_sent() routines
      
       2) As a consequence, it removes an now unnecessary test with regard to `len > 0'
          in ccid3_hc_tx_packet_sent: that condition is always true, since
            * negative packet lengths are avoided
            * ccid3_hc_tx_send_packet flags an error whenever the payload length is 0.
              As a consequence, ccid3_hc_tx_packet_sent is never called as all errors
              returned by ccid_hc_tx_send_packet are caught in dccp_write_xmit
      
       3) Removes the third argument of ccid_hc_tx_send_packet (the `len' parameter),
          since it is currently always set to skb->len. The code is updated with regard
          to this parameter change.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      6b57c93d
    • Gerrit Renker's avatar
      [DCCP] ccid3: Larger initial windows · a79ef76f
      Gerrit Renker authored
      This implements the larger-initial-windows feature for CCID 3, as described in
      section 5 of RFC 4342. When the first feedback packet arrives, the sender can
      send up to 2..4 packets per RTT, instead of just one.
      
      The patch further
       * reduces the number of timestamping calls by passing the timestamp value
         (which is computed in one of the calling functions anyway) as argument
      
       * renames one constant with a very long name into one which is shorter and
         resembles the one in RFC 3448 (t_mbi)
      
       * simplifies some of the min_t/max_t cases where both `x', `y' have the same
         type
      
      Commiter note: renamed TFRC_t_mbi to TFRC_T_MBI, to follow Linux coding style.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      a79ef76f
    • Gerrit Renker's avatar
      78ad713d
    • Gerrit Renker's avatar
      [DCCP] ccid3: Set NoFeedback Timeout according to RFC 3448 · 2a1fda6f
      Gerrit Renker authored
      This corrects the setting of the nofeedback timer with regard to RFC
      3448 - previously it was not set to max(4*R, 2*s/X) as specified. Using
      the maximum of 1 second as upper bound (as it was done before) can have
      detrimental effects, especially if R is small.
      Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      2a1fda6f
    • Gerrit Renker's avatar
      [DCCP] ccid3: Consolidate handling of t_RTO · 5d0dbc4a
      Gerrit Renker authored
      This patch
       * removes setting t_RTO in ccid3_hc_tx_init (per [RFC 3448, 4.2], t_RTO is
         undefined until feedback has been received);
      
       * makes some trivial changes (updates of comments);
      
       * performs a small optimisation by exploiting that the feedback timeout
         uses the value of t_ipi. The way it is done is safe, because the timeouts
         appear after the changes to t_ipi, ensuring that up-to-date values are used;
      
       * in ccid3_hc_tx_packet_recv, moves the t_rto statement closer to the calculation
         of the next_tmout. This makes the code clearer to read and is also safe, since
         t_rto is not updated until the next call of ccid3_hc_tx_packet_recv, and is not
         read by the functions called via ccid_wait_for_ccid();
      
       * removes a `max' statement in sk_reset_timer, this is not needed since the timeout
         value is always greater than 1E6 microseconds.
      
       * adds `XXX'es to highlight that currently the nofeedback timer is set
         in a non-standard way
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      5d0dbc4a
    • Gerrit Renker's avatar
      [DCCP] ccid3: Consistently update t_nom, t_ipi, t_delta · 17893bc1
      Gerrit Renker authored
      This patch:
      
       * consolidates updating of parameters (t_nom, t_ipi, t_delta) which
         need to be updated at the same time, since they are inter-dependent
      
       * removes two inline functions which are no longer needed as a result of
         the above consolidation
      
       * resolves a FIXME regarding the re-calculation of t_ipi within the nofeedback
         timer, in the state where no feedback has previously been received
      
       * ties updating these parameters to updating the sending rate X, exploiting
         that all three parameters in turn depend on X; and using a small optimisation
         which can reduce the number of required instructions: only update the three
         parameters when X really changes
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      17893bc1
    • Gerrit Renker's avatar
      [DCCP] ccid3: Consolidate timer resets · 48e03eee
      Gerrit Renker authored
      This patch concerns updating the value of the nofeedback timer when no feedback
      has been received so far.
      
      Since in this case the value of R is still undefined according to [RFC 3448,
      4.2], we can not perform step (3) of [RFC 3448, 4.3].  A clarification is
      provided in [RFC 4342, sec. 5], which states that in these cases the nofeedback
      timer (still) expires "after two seconds".
      
      Many thanks to Ian McDonald for pointing this out and providing the
      clarification.
      
      The patch
        * implements [RFC 4342, sec. 5] with regard to the above case
        * consolidates handling timer restart by
      	- adding an appropriate jump label and
      	- initialising the timeout value
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      48e03eee
    • Gerrit Renker's avatar
      [DCCP] ccid3: Resolve small FIXME · 5e19e3fc
      Gerrit Renker authored
      This considers the  case - ACK received while no packet has been sent
      so far. Resolved by printing a (rate-limited) warning message.
      
      Further removes an unnecessary BUG_ON in ccid3_hc_tx_packet_recv,
      received feedback on a terminating connection is simply ignored.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      5e19e3fc
    • Gerrit Renker's avatar
      [DCCP] ccid3: Remove redundant statements in ccid3_hc_tx_packet_sent · 70dbd5b0
      Gerrit Renker authored
      This patch removes a switch statement which is redundant since,
       * nothing is done in states TFRC_SSTATE_NO_SENT/TFRC_SSTATE_NO_FBACK
       * it is impossible that the function is called in the state TFRC_SSTATE_TERM, since
             --the function is called, in dccp_write_xmit, after ccid3_hc_tx_send_packet
             --if ccid3_hc_tx_send_packet is called in state TFRC_SSTATE_TERM, it returns
               -EINVAL, which means that ccid3_hc_tx_packet_sent will not be called
      	 (compare dccp_write_xmit)
             --> therefore, this case is logically impossible
       * the remaining state is TFRC_SSTATE_FBACK which conditionally updates t_ipi, t_nom,
         and t_delta. This is a no-op, since
             --t_ipi only changes when feedback is received
             --however, when feedback arrives via ccid3_hc_tx_packet_recv, there is an identical
               code block which performs the same set of operations
             --performing the same set of operations again in ccid3_hc_tx_packet_sent therefore
               does not change anything, since between the time of receiving the last feedback
      	 (and therefore update of t_ipi, t_nom, and t_delta), the value of t_ipi has not
      	 changed
             --since t_ipi has not changed, the values of t_delta and t_nom also do not change,
               they depend fully on t_ipi
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      70dbd5b0
    • Gerrit Renker's avatar
      [DCCP] ccid3: Avoid congestion control on zero-sized data packets · da335baf
      Gerrit Renker authored
      This resolves an `XXX' in ccid3_hc_tx_send_packet().
      
      The function is only called on Data and DataAck packets and returns a negative
      result on zero-sized messages. This is a reasonable policy since CCID 3 is a
      congestion-control module and congestion control on zero-sized Data(Ack)
      packets is in a way pathological.
      
      The patch uses a more suitable error code for this case, it returns the Posix.1
      code `EBADMSG' ("Not a data message") instead of `ENOTCONN'.
      
      As a result of ignoring zero-sized packets, a the condition for a warning
      "First packet is data" in ccid3_hc_tx_packet_sent is always satisfied; this
      message has been removed since it will always be printed.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      da335baf
    • Gerrit Renker's avatar
      [DCCP] ccid3: Simplify control flow of ccid3_hc_tx_send_packet · 7da7f456
      Gerrit Renker authored
      This makes some logically equivalent simplifications, by replacing
      rc - values plus goto's with direct return statements.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      7da7f456
    • Gerrit Renker's avatar
      91cf5a17
    • Gerrit Renker's avatar
      [DCCP] ccid3: Simplify control flow in the calculation of t_ipi · f5c2d636
      Gerrit Renker authored
      This patch performs a simplifying (performance) optimisation:
      
       In each call of the inline function ccid3_calc_new_t_ipi(), the state is
       tested against TFRC_SSTATE_NO_FBACK. This is expensive when the function
       is called very often. A simpler solution, implemented by this patch, is
       to adapt the control flow.
      
      Background:
      f5c2d636
    • Gerrit Renker's avatar
      90feeb95
    • Ian McDonald's avatar
      [DCCP] CCID3: Remove non-referenced variable · 45543173
      Ian McDonald authored
      This removes a non-referenced variable.
      Signed-off-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      45543173
    • Gerrit Renker's avatar
      [DCCP]: Simplified conditions due to use of enum:8 states · 59348b19
      Gerrit Renker authored
      This reaps the benefit of the earlier patch, which changed the type of
      CCID 3 states to use enums, in that many conditions are now simplified
      and the number of possible (unexpected) values is greatly reduced.
      
      In a few instances, this also allowed to simplify pre-conditions; where
      care has been taken to retain logical equivalence.
      
      [DCCP]: Introduce a consistent BUG/WARN message scheme
      
      This refines the existing set of DCCP messages so that
       * BUG(), BUG_ON(), WARN_ON() have meaningful DCCP-specific counterparts
       * DCCP_CRIT (for severe warnings) is not rate-limited
       * DCCP_WARN() is introduced as rate-limited wrapper
      
      Using these allows a faster and cleaner transition to their original
      counterparts once the code has matured into a full DCCP implementation.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      59348b19
    • Gerrit Renker's avatar
      [DCCP]: Add CCID3 debug support to Kconfig · 56724aa4
      Gerrit Renker authored
      This adds a CCID3 debug option to the configuration menu
      which is missing in Kconfig, but already used by the code.
      
      CCID 2 already provides such an entry.
      
      To enable debugging, set CONFIG_IP_DCCP_CCID3_DEBUG=y
      
      NOTE: The use of ccid3_{t,r}x_state_name is safe, since
            now only enum values can appear.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      56724aa4
    • Gerrit Renker's avatar
      [DCCP]: Introduce DCCP_{BUG{_ON},CRIT} macros, use enum:8 for the ccid3 states · 3c695262
      Gerrit Renker authored
      This patch tackles the following problem:
             * the ccid3_hc_{t,r}x_sock define ccid3hc{t,r}x_state as `u8', but
               in reality there can only be a few, pre-defined enum names
             * this necessitates addiditional checking for unexpected values
               which would otherwise be caught by the compiler
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
      3c695262
  4. 24 Oct, 2006 1 commit
  5. 24 Sep, 2006 1 commit
  6. 22 Sep, 2006 1 commit
    • Ian McDonald's avatar
      [DCCP]: Tidyup CCID3 list handling · fc747e82
      Ian McDonald authored
      As Arnaldo Carvalho de Melo points out I should be using list_entry in case
      the structure changes in future. Current code functions but is reliant
      on position and requires type cast.
      
      Noticed when doing this that I have one more variable than I needed so
      removing that also.
      
      Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc747e82
  7. 27 Aug, 2006 2 commits
    • Ian McDonald's avatar
      [DCCP]: Fix CCID3 · 66a377c5
      Ian McDonald authored
      This fixes CCID3 to give much closer performance to RFC4342.
      
      CCID3 is meant to alter sending rate based on RTT and loss.
      
      The performance was verified against:
      http://wand.net.nz/~perry/max_download.php
      
      For example I tested with netem and had the following parameters:
      Delayed Acks 1, MSS 256 bytes, RTT 105 ms, packet loss 5%.
      
      This gives a theoretical speed of 71.9 Kbits/s. I measured across three
      runs with this patch set and got 70.1 Kbits/s. Without this patchset the
      average was 232 Kbits/s which means Linux can't be used for CCID3 research
      properly.
      
      I also tested with netem turned off so box just acting as router with 1.2
      msec RTT. The performance with this is the same with or without the patch
      at around 30 Mbit/s.
      
      Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66a377c5
    • Ian McDonald's avatar
      [DCCP]: Update contact details and copyright · e6bccd35
      Ian McDonald authored
      Just updating copyright and contacts
      
      Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6bccd35
  8. 30 Jun, 2006 1 commit