1. 20 12月, 2011 1 次提交
  2. 17 12月, 2011 1 次提交
  3. 12 12月, 2011 1 次提交
  4. 10 12月, 2011 2 次提交
  5. 07 12月, 2011 2 次提交
  6. 02 12月, 2011 2 次提交
    • D
      dccp: Fix compile warning in probe code. · d984e619
      David S. Miller 提交于
      Commit 1386be55 ("dccp: fix
      auto-loading of dccp(_probe)") fixed a bug but created a new
      compiler warning:
      
      net/dccp/probe.c: In function ‘dccpprobe_init’:
      net/dccp/probe.c:166:2: warning: the omitted middle operand in ?: will always be ‘true’, suggest explicit middle operand [-Wparentheses]
      
      try_then_request_module() is built for situations where the
      "existence" test is some lookup function that returns a non-NULL
      object on success, and with a reference count of some kind held.
      
      Here we're looking for a success return of zero from the jprobe
      registry.
      
      Instead of fighting the way try_then_request_module() works, simply
      open code what we want to happen in a local helper function.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d984e619
    • D
      dccp: Evaluate ip_hdr() only once in dccp_v4_route_skb(). · 898f7358
      David S. Miller 提交于
      This also works around a bogus gcc warning generated by an
      upcoming patch from Eric Dumazet that rearranges the layout
      of struct flowi4.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      898f7358
  7. 23 11月, 2011 1 次提交
  8. 22 11月, 2011 1 次提交
  9. 09 11月, 2011 1 次提交
  10. 04 11月, 2011 1 次提交
  11. 01 11月, 2011 2 次提交
  12. 27 10月, 2011 1 次提交
  13. 07 8月, 2011 1 次提交
    • D
      net: Compute protocol sequence numbers and fragment IDs using MD5. · 6e5714ea
      David S. Miller 提交于
      Computers have become a lot faster since we compromised on the
      partial MD4 hash which we use currently for performance reasons.
      
      MD5 is a much safer choice, and is inline with both RFC1948 and
      other ISS generators (OpenBSD, Solaris, etc.)
      
      Furthermore, only having 24-bits of the sequence number be truly
      unpredictable is a very serious limitation.  So the periodic
      regeneration and 8-bit counter have been removed.  We compute and
      use a full 32-bit sequence number.
      
      For ipv6, DCCP was found to use a 32-bit truncated initial sequence
      number (it needs 43-bits) and that is fixed here as well.
      Reported-by: NDan Kaminsky <dan@doxpara.com>
      Tested-by: NWilly Tarreau <w@1wt.eu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e5714ea
  14. 01 8月, 2011 7 次提交
    • S
      dccp ccid-2: check Ack Ratio when reducing cwnd · d96a9e8d
      Samuel Jero 提交于
      This patch causes CCID-2 to check the Ack Ratio after reducing the congestion
      window. If the Ack Ratio is greater than the congestion window, it is
      reduced. This prevents timeouts caused by an Ack Ratio larger than the
      congestion window.
      
      In this situation, we choose to set the Ack Ratio to half the congestion window
      (or one if that's zero) so that if we loose one ack we don't trigger a timeout.
      
      Signed-off-by: Samuel Jero <sj323707@ohio.edu> 
      Acked-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      d96a9e8d
    • S
      dccp ccid-2: increment cwnd correctly · 0ce95dc7
      Samuel Jero 提交于
      This patch fixes an issue where CCID-2 will not increase the congestion
      window for numerous RTTs after an idle period, application-limited period,
      or a loss once the algorithm is in Congestion Avoidance.
      
      What happens is that, when CCID-2 is in Congestion Avoidance mode, it will
      increase hc->tx_packets_acked by one for every packet and will increment cwnd
      every cwnd packets. However, if there is now an idle period in the connection,
      cwnd will be reduced, possibly below the slow start threshold. This will
      cause the connection to go into Slow Start. However, in Slow Start CCID-2
      performs this test to increment cwnd every second ack:
      
      	++hc->tx_packets_acked == 2
      
      Unfortunately, this will be incorrect, if cwnd previous to the idle period
      was larger than 2 and if tx_packets_acked was close to cwnd. For example:
      	cwnd=50  and  tx_packets_acked=45.
      
      In this case, the current code, will increment tx_packets_acked until it
      equals two, which will only be once tx_packets_acked (an unsigned 32-bit
      integer) overflows.
      
      My fix is simply to change that test for tx_packets_acked greater than or
      equal to two in slow start.
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      0ce95dc7
    • S
      dccp ccid-2: prevent cwnd > Sequence Window · d346d886
      Samuel Jero 提交于
      Add a check to prevent CCID-2 from increasing the cwnd greater than the
      Sequence Window.
      
      When the congestion window becomes bigger than the Sequence Window, CCID-2
      will attempt to keep more data in the network than the DCCP Sequence Window
      code considers possible. This results in the Sequence Window code issuing
      a Sync, thereby inducing needless overhead. Further, if this occurs at the
      sender, CCID-2 will never detect the problem because the Acks it receives
      will indicate no losses. I have seen this cause a drop of 1/3rd in throughput
      for a connection.
      
      Also add code to adjust the Sequence Window to be about 5 times the number of
      packets in the network (RFC 4340, 7.5.2) and to adjust the Ack Ratio so that
      the remote Sequence Window will hold about 5 times the number of packets in
      the network. This allows the congestion window to increase correctly without
      being limited by the Sequence Window.
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      d346d886
    • G
      dccp ccid-2: use feature-negotiation to report Ack Ratio changes · 31daf039
      Gerrit Renker 提交于
      This uses the new feature-negotiation framework to signal Ack Ratio changes,
      as required by RFC 4341, sec. 6.1.2.
      
      That raises some problems with CCID-2, which at the moment can not cope
      gracefully with Ack Ratios > 1. Since these issues are not directly related
      to feature negotiation, they are marked by a FIXME.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.uk>
      31daf039
    • S
      dccp: send Confirm options only once · a6444f42
      Samuel Jero 提交于
      If a connection is in the OPEN state, remove feature negotiation Confirm
      options from the list of options after sending them once; as such options
      are NOT supposed to be retransmitted and are ONLY supposed to be sent in
      response to a Change option (RFC 4340 6.2).
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      a6444f42
    • G
      dccp: support for exchanging of NN options in established state 2/2 · 44e6fd9e
      Gerrit Renker 提交于
      This patch adds the receiver side and the (fast-path) activation part for
      dynamic changes of non-negotiable (NN) parameters in (PART)OPEN state.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.uk>
      44e6fd9e
    • G
      dccp: support for the exchange of NN options in established state 1/2 · d6916f87
      Gerrit Renker 提交于
      In contrast to static feature negotiation at the begin of a connection, this
      patch introduces support for exchange of dynamically changing options.
      
      Such an update/exchange is necessary in at least two cases:
       * CCID-2's Ack Ratio (RFC 4341, 6.1.2) which changes during the connection;
       * Sequence Window values that, as per RFC 4340, 7.5.2, should be sent "as
         the connection progresses".
      
      Both are non-negotiable (NN) features, which means that no new capabilities
      are negotiated, but rather that changes in known parameters are brought
      up-to-date at either end.
      
      Thse characteristics are reflected by the implementation:
       * only NN options can be exchanged after connection setup;
       * an ack is scheduled directly after activation to speed up the update;
       * CCIDs may request changes to an NN feature even if a negotiation for that
         feature is already underway: this is required by CCID-2, where changes in
         cwnd necessitate Ack Ratio changes, such that the previous Ack Ratio (which
         is still being negotiated) would cause irrecoverable RTO timeouts (thanks
         to work by Samuel Jero).	   
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.uk>
      d6916f87
  15. 05 7月, 2011 6 次提交
    • G
      dccp ccid-2: Perform congestion-window validation · 113ced1f
      Gerrit Renker 提交于
      CCID-2's cwnd increases like TCP during slow-start, which has implications for
       * the local Sequence Window value (should be > cwnd),
       * the Ack Ratio value.
      Hence an exponential growth, if it does not reflect the actual network
      conditions, can quickly lead to instability.
      
      This patch adds congestion-window validation (RFC2861) to CCID-2:
       * cwnd is constrained if the sender is application limited;
       * cwnd is reduced after a long idle period, as suggested in the '90 paper
         by Van Jacobson, in RFC 2581 (sec. 4.1);
       * cwnd is never reduced below the RFC 3390 initial window.
      
      As marked in the comments, the code is actually almost a direct copy of the
      TCP congestion-window-validation algorithms. By continuing this work, it may
      in future be possible to use the TCP code (not possible at the moment).
      
      The mechanism can be turned off using a module parameter. Sampling of the
      currently-used window (moving-maximum) is however done constantly; this is
      used to determine the expected window, which can be exploited to regulate
      DCCP's Sequence Window value.
      
      This patch also sets slow-start-after-idle (RFC 4341, 5.1), i.e. it behaves like
      TCP when net.ipv4.tcp_slow_start_after_idle = 1.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      113ced1f
    • G
      dccp ccid-2: Use existing function to test for data packets · 58fdea0f
      Gerrit Renker 提交于
      This replaces a switch statement with a test, using the equivalent
      function dccp_data_packet(skb).  It also doubles the range of the field
      `rx_num_data_pkts' by changing the type from `int' to `u32', avoiding
      signed/unsigned comparison with the u16 field `dccps_r_ack_ratio'.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      58fdea0f
    • G
      dccp ccid-2: move rfc 3390 function into header file · b4d5f4b2
      Gerrit Renker 提交于
      This moves CCID-2's initial window function into the header file, since several
      parts throughout the CCID-2 code need to call it (CCID-2 still uses RFC 3390).
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NLeandro Melo de Sales <leandro@ic.ufal.br>
      b4d5f4b2
    • G
      dccp: cosmetics of info message · 1fd9d208
      Gerrit Renker 提交于
      Change the CCID (de)activation message to start with the
      protocol name, as 'CCID' is already in there.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      1fd9d208
    • G
      dccp: combine the functionality of enqeueing and cloning · 8695e801
      Gerrit Renker 提交于
      Realising the following call pattern,
       * first dccp_entail() is called to enqueue a new skb and
       * then skb_clone() is called to transmit a clone of that skb,
      this patch integrates both into the same function.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      8695e801
    • G
      dccp: Clean up slow-path input processing · c0c20150
      Gerrit Renker 提交于
      This patch rearranges the order of statements of the slow-path input processing
      (i.e. any other state than OPEN), to resolve the following issues.
      
       1. Dependencies: the order of statements now better matches RFC 4340, 8.5, i.e.
          step 7 is before step 9 (previously 9 was before 7), and parsing options in
          step 8 (which may consume resources) now comes after step 7.
       2. Sequence number checks are omitted if in state LISTEN/REQUEST, due to the
          note underneath the table in RFC 4340, 7.5.3.
          As a result, CCID processing is now indeed confined to OPEN/PARTOPEN states,
          i.e. congestion control is performed only on the flow of data packets. This
          avoids pathological cases of doing congestion control on those messages
          which set up and terminate the connection.
       3. Packets are now passed on to Ack Vector / CCID processing only after
          - step 7  (receive unexpected packets),
          - step 9  (receive Reset),
          - step 13 (receive CloseReq),
          - step 14 (receive Close)
          and only if the state is PARTOPEN. This simplifies CCID processing:
          - in LISTEN/CLOSED the CCIDs are non-existent;
          - in RESPOND/REQUEST the CCIDs have not yet been negotiated;
          - in CLOSEREQ and active-CLOSING the node has already closed this socket;
          - in passive-CLOSING the client is waiting for its Reset.
          In the last case, RFC 4340, 8.3 leaves it open to ignore further incoming
          data, which is the approach taken here.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      c0c20150
  16. 19 5月, 2011 1 次提交
  17. 09 5月, 2011 3 次提交
  18. 07 5月, 2011 1 次提交
  19. 04 5月, 2011 1 次提交
  20. 29 4月, 2011 2 次提交
    • D
      ipv4: Get route daddr from flow key in dccp_v4_connect(). · 91ab0b60
      David S. Miller 提交于
      Now that output route lookups update the flow with
      destination address selection, we can fetch it from
      fl4->daddr instead of rt->rt_dst
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91ab0b60
    • E
      inet: add RCU protection to inet->opt · f6d8bd05
      Eric Dumazet 提交于
      We lack proper synchronization to manipulate inet->opt ip_options
      
      Problem is ip_make_skb() calls ip_setup_cork() and
      ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
      without any protection against another thread manipulating inet->opt.
      
      Another thread can change inet->opt pointer and free old one under us.
      
      Use RCU to protect inet->opt (changed to inet->inet_opt).
      
      Instead of handling atomic refcounts, just copy ip_options when
      necessary, to avoid cache line dirtying.
      
      We cant insert an rcu_head in struct ip_options since its included in
      skb->cb[], so this patch is large because I had to introduce a new
      ip_options_rcu structure.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6d8bd05
  21. 28 4月, 2011 1 次提交
    • D
      ipv4: Sanitize and simplify ip_route_{connect,newports}() · 2d7192d6
      David S. Miller 提交于
      These functions are used together as a unit for route resolution
      during connect().  They address the chicken-and-egg problem that
      exists when ports need to be allocated during connect() processing,
      yet such port allocations require addressing information from the
      routing code.
      
      It's currently more heavy handed than it needs to be, and in
      particular we allocate and initialize a flow object twice.
      
      Let the callers provide the on-stack flow object.  That way we only
      need to initialize it once in the ip_route_connect() call.
      
      Later, if ip_route_newports() needs to do anything, it re-uses that
      flow object as-is except for the ports which it updates before the
      route re-lookup.
      
      Also, describe why this set of facilities are needed and how it works
      in a big comment.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Reviewed-by: NEric Dumazet <eric.dumazet@gmail.com>
      2d7192d6
  22. 23 4月, 2011 1 次提交