1. 10 Oct, 2007 16 commits
  2. 08 Oct, 2007 1 commit
    • Ilpo Järvinen's avatar
      [TCP]: Fix fastpath_cnt_hint when GSO skb is partially ACKed · 48611c47
      Ilpo Järvinen authored
      
      
      When only GSO skb was partially ACKed, no hints are reset,
      therefore fastpath_cnt_hint must be tweaked too or else it can
      corrupt fackets_out. The corruption to occur, one must have
      non-trivial ACK/SACK sequence, so this bug is not very often
      that harmful. There's a fackets_out state reset in TCP because
      fackets_out is known to be inaccurate and that fixes the issue
      eventually anyway.
      
      In case there was also at least one skb that got fully ACKed,
      the fastpath_skb_hint is set to NULL which causes a recount for
      fastpath_cnt_hint (the old value won't be accessed anymore),
      thus it can safely be decremented without additional checking.
      
      Reported by Cedric Le Goater <clg@fr.ibm.com>
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48611c47
  3. 31 Aug, 2007 1 commit
  4. 30 Aug, 2007 1 commit
  5. 26 Aug, 2007 1 commit
  6. 02 Aug, 2007 2 commits
  7. 31 Jul, 2007 3 commits
    • Ilpo Järvinen's avatar
      [TCP]: Bidir flow must not disregard SACK blocks for lost marking · b8ed601c
      Ilpo Järvinen authored
      
      
      It's possible that new SACK blocks that should trigger new LOST
      markings arrive with new data (which previously made is_dupack
      false). In addition, I think this fixes a case where we get
      a cumulative ACK with enough SACK blocks to trigger the fast
      recovery (is_dupack would be false there too).
      
      I'm not completely pleased with this solution because readability
      of the code is somewhat questionable as 'is_dupack' in SACK case
      is no longer about dupacks only but would mean something like
      'lost_marker_work_todo' too... But because of Eifel stuff done
      in CA_Recovery, the FLAG_DATA_SACKED check cannot be placed to
      the if statement which seems attractive solution. Nevertheless,
      I didn't like adding another variable just for that either... :-)
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8ed601c
    • Ilpo Järvinen's avatar
      [TCP]: Fix ratehalving with bidirectional flows · 1e757f99
      Ilpo Järvinen authored
      
      
      Actually, the ratehalving seems to work too well, as cwnd is
      reduced on every second ACK even though the packets in flight
      remains unchanged. Recoveries in a bidirectional flows suffer
      quite badly because of this, both NewReno and SACK are affected.
      
      After this patch, rate halving is performed for ACK only if
      packets in flight was supposedly changed too.
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e757f99
    • Stephen Hemminger's avatar
      [TCP]: congestion control API pass RTT in microseconds · 30cfd0ba
      Stephen Hemminger authored
      
      
      This patch changes the API for the callback that is done after an ACK is
      received. It solves a couple of issues:
      
        * Some congestion controls want higher resolution value of RTT
          (controlled by TCP_CONG_RTT_SAMPLE flag). These don't really want a ktime, but
          all compute a RTT in microseconds.
      
        * Other congestion control could use RTT at jiffies resolution.
      
      To keep API consistent the units should be the same for both cases, just the
      resolution should change.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30cfd0ba
  8. 18 Jul, 2007 1 commit
  9. 15 Jul, 2007 1 commit
  10. 15 Jun, 2007 2 commits
  11. 14 Jun, 2007 1 commit
  12. 12 Jun, 2007 1 commit
  13. 03 Jun, 2007 1 commit
  14. 19 May, 2007 2 commits
  15. 30 Apr, 2007 2 commits
  16. 25 Apr, 2007 4 commits
    • Stephen Hemminger's avatar
      [TCP]: Congestion control API update. · 164891aa
      Stephen Hemminger authored
      
      
      Do some simple changes to make congestion control API faster/cleaner.
      * use ktime_t rather than timeval
      * merge rtt sampling into existing ack callback
        this means one indirect call versus two per ack.
      * use flags bits to store options/settings
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      164891aa
    • Ilpo Järvinen's avatar
      [TCP]: Sed magic converts func(sk, tp, ...) -> func(sk, ...) · 9e412ba7
      Ilpo Järvinen authored
      
      
      This is (mostly) automated change using magic:
      
      sed -e '/struct sock \*sk/ N' -e '/struct sock \*sk/ N'
          -e '/struct sock \*sk/ N' -e '/struct sock \*sk/ N'
          -e 's|struct sock \*sk,[\n\t ]*struct tcp_sock \*tp\([^{]*\n{\n\)|
      	  struct sock \*sk\1\tstruct tcp_sock *tp = tcp_sk(sk);\n|g'
          -e 's|struct sock \*sk, struct tcp_sock \*tp|
      	  struct sock \*sk|g' -e 's|sk, tp\([^-]\)|sk\1|g'
      
      Fixed four unused variable (tp) warnings that were introduced.
      
      In addition, manually added newlines after local variables and
      tweaked function arguments positioning.
      
      $ gcc --version
      gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
      ...
      $ codiff -fV built-in.o.old built-in.o.new
      net/ipv4/route.c:
        rt_cache_flush |  +14
       1 function changed, 14 bytes added
      
      net/ipv4/tcp.c:
        tcp_setsockopt |   -5
        tcp_sendpage   |  -25
        tcp_sendmsg    |  -16
       3 functions changed, 46 bytes removed
      
      net/ipv4/tcp_input.c:
        tcp_try_undo_recovery |   +3
        tcp_try_undo_dsack    |   +2
        tcp_mark_head_lost    |  -12
        tcp_ack               |  -15
        tcp_event_data_recv   |  -32
        tcp_rcv_state_process |  -10
        tcp_rcv_established   |   +1
       7 functions changed, 6 bytes added, 69 bytes removed, diff: -63
      
      net/ipv4/tcp_output.c:
        update_send_head          |   -9
        tcp_transmit_skb          |  +19
        tcp_cwnd_validate         |   +1
        tcp_write_wakeup          |  -17
        __tcp_push_pending_frames |  -25
        tcp_push_one              |   -8
        tcp_send_fin              |   -4
       7 functions changed, 20 bytes added, 63 bytes removed, diff: -43
      
      built-in.o.new:
       18 functions changed, 40 bytes added, 178 bytes removed, diff: -138
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e412ba7
    • Stephen Hemminger's avatar
      [NET]: cleanup extra semicolons · 3ff50b79
      Stephen Hemminger authored
      
      
      Spring cleaning time...
      
      There seems to be a lot of places in the network code that have
      extra bogus semicolons after conditionals.  Most commonly is a
      bogus semicolon after: switch() { }
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ff50b79
    • Herbert Xu's avatar
      [NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY · 60476372
      Herbert Xu authored
      
      
      When a transmitted packet is looped back directly, CHECKSUM_PARTIAL
      maps to the semantics of CHECKSUM_UNNECESSARY.  Therefore we should
      treat it as such in the stack.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      60476372