1. 26 4月, 2007 4 次提交
    • I
      [TCP]: Add two new spurious RTO responses to FRTO · 3cfe3baa
      Ilpo Järvinen 提交于
      New sysctl tcp_frto_response is added to select amongst these
      responses:
      	- Rate halving based; reuses CA_CWR state (default)
      	- Very conservative; used to be the only one available (=1)
      	- Undo cwr; undoes ssthresh and cwnd reductions (=2)
      
      The response with rate halving requires a new parameter to
      tcp_enter_cwr because FRTO has already reduced ssthresh and
      doing a second reduction there has to be prevented. In addition,
      to keep things nice on 80 cols screen, a local variable was
      added.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3cfe3baa
    • J
    • I
      [TCP] FRTO: Entry is allowed only during (New)Reno like recovery · 46d0de4e
      Ilpo Järvinen 提交于
      This interpretation comes from RFC4138:
          "If the sender implements some loss recovery algorithm other
           than Reno or NewReno [FHG04], the F-RTO algorithm SHOULD
           NOT be entered when earlier fast recovery is underway."
      
      I think the RFC means to say (especially in the light of
      Appendix B) that ...recovery is underway (not just fast recovery)
      or was underway when it was interrupted by an earlier (F-)RTO
      that hasn't yet been resolved (snd_una has not advanced enough).
      Thus, my interpretation is that whenever TCP has ever
      retransmitted other than head, basic version cannot be used
      because then the order assumptions which are used as FRTO basis
      do not hold.
      
      NewReno has only the head segment retransmitted at a time.
      Therefore, walk up to the segment that has not been SACKed, if
      that segment is not retransmitted nor anything before it, we know
      for sure, that nothing after the non-SACKed segment should be
      either. This assumption is valid because TCPCB_EVER_RETRANS does
      not leave holes but each non-SACKed segment is rexmitted
      in-order.
      
      Check for retrans_out > 1 avoids more expensive walk through the
      skb list, as we can know the result beforehand: F-RTO will not be
      allowed.
      
      SACKed skb can turn into non-SACked only in the extremely rare
      case of SACK reneging, in this case we might fail to detect
      retransmissions if there were them for any other than head. To
      get rid of that feature, whole rexmit queue would have to be
      walked (always) or FRTO should be prevented when SACK reneging
      happens. Of course RTO should still trigger after reneging which
      makes this issue even less likely to show up. And as long as the
      response is as conservative as it's now, nothing bad happens even
      then.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46d0de4e
    • I
      [TCP] FRTO: Moved tcp_use_frto from tcp.h to tcp_input.c · bdaae17d
      Ilpo Järvinen 提交于
      In addition, removed inline.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdaae17d
  2. 09 2月, 2007 1 次提交
  3. 05 1月, 2007 1 次提交
  4. 23 12月, 2006 1 次提交
    • G
      [TCP]: Fix ambiguity in the `before' relation. · 9a036b9c
      Gerrit Renker 提交于
      While looking at DCCP sequence numbers, I stumbled over a problem with
      the following definition of before in tcp.h:
      
      static inline int before(__u32 seq1, __u32 seq2)
      {
              return (__s32)(seq1-seq2) < 0;
      }
      
      Problem: This definition suffers from an an ambiguity, i.e. always
      
                 before(a, (a + 2^31) % 2^32)) = 1
                 before((a + 2^31) % 2^32), a) = 1
      
               In text: when the difference between a and b amounts to 2^31,
               a is always considered `before' b, the function can not decide.
               The reason is that implicitly 0 is `before' 1 ... 2^31-1 ... 2^31
      
      Solution: There is a simple fix, by defining before in such a way that
                0 is no longer `before' 2^31, i.e. 0 `before' 1 ... 2^31-1
                By not using the middle between 0 and 2^32, before can be made
                unambiguous.
                This is achieved by testing whether seq2-seq1 > 0 (using signed
                32-bit arithmetic).
      
      I attach a patch to codify this. Also the `after' relation is basically
      a redefinition of `before', it is now defined as a macro after before.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9a036b9c
  5. 03 12月, 2006 7 次提交
  6. 03 8月, 2006 1 次提交
    • W
      [TCP]: SNMPv2 tcpAttemptFails counter error · 3687b1dc
      Wei Yongjun 提交于
      Refer to RFC2012, tcpAttemptFails is defined as following:
        tcpAttemptFails OBJECT-TYPE
            SYNTAX      Counter32
            MAX-ACCESS  read-only
            STATUS      current
            DESCRIPTION
                    "The number of times TCP connections have made a direct
                    transition to the CLOSED state from either the SYN-SENT
                    state or the SYN-RCVD state, plus the number of times TCP
                    connections have made a direct transition to the LISTEN
                    state from the SYN-RCVD state."
            ::= { tcp 7 }
      
      When I lookup into RFC793, I found that the state change should occured
      under following condition:
        1. SYN-SENT -> CLOSED
           a) Received ACK,RST segment when SYN-SENT state.
      
        2. SYN-RCVD -> CLOSED
           b) Received SYN segment when SYN-RCVD state(came from LISTEN).
           c) Received RST segment when SYN-RCVD state(came from SYN-SENT).
           d) Received SYN segment when SYN-RCVD state(came from SYN-SENT).
      
        3. SYN-RCVD -> LISTEN
           e) Received RST segment when SYN-RCVD state(came from LISTEN).
      
      In my test, those direct state transition can not be counted to
      tcpAttemptFails.
      Signed-off-by: NWei Yongjun <yjwei@nanjing-fnst.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3687b1dc
  7. 09 7月, 2006 1 次提交
  8. 01 7月, 2006 1 次提交
  9. 30 6月, 2006 1 次提交
    • H
      [NET]: Added GSO header verification · 576a30eb
      Herbert Xu 提交于
      When GSO packets come from an untrusted source (e.g., a Xen guest domain),
      we need to verify the header integrity before passing it to the hardware.
      
      Since the first step in GSO is to verify the header, we can reuse that
      code by adding a new bit to gso_type: SKB_GSO_DODGY.  Packets with this
      bit set can only be fed directly to devices with the corresponding bit
      NETIF_F_GSO_ROBUST.  If the device doesn't have that bit, then the skb
      is fed to the GSO engine which will allow the packet to be sent to the
      hardware if it passes the header check.
      
      This patch changes the sg flag to a full features flag.  The same method
      can be used to implement TSO ECN support.  We simply have to mark packets
      with CWR set with SKB_GSO_ECN so that only hardware with a corresponding
      NETIF_F_TSO_ECN can accept them.  The GSO engine can either fully segment
      the packet, or segment the first MTU and pass the rest to the hardware for
      further segmentation.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      576a30eb
  10. 23 6月, 2006 2 次提交
    • H
      [NET]: Add software TSOv4 · f4c50d99
      Herbert Xu 提交于
      This patch adds the GSO implementation for IPv4 TCP.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4c50d99
    • H
      [NET]: Merge TSO/UFO fields in sk_buff · 7967168c
      Herbert Xu 提交于
      Having separate fields in sk_buff for TSO/UFO (tso_size/ufo_size) is not
      going to scale if we add any more segmentation methods (e.g., DCCP).  So
      let's merge them.
      
      They were used to tell the protocol of a packet.  This function has been
      subsumed by the new gso_type field.  This is essentially a set of netdev
      feature bits (shifted by 16 bits) that are required to process a specific
      skb.  As such it's easy to tell whether a given device can process a GSO
      skb: you just have to and the gso_type field and the netdev's features
      field.
      
      I've made gso_type a conjunction.  The idea is that you have a base type
      (e.g., SKB_GSO_TCPV4) that can be modified further to support new features.
      For example, if we add a hardware TSO type that supports ECN, they would
      declare NETIF_F_TSO | NETIF_F_TSO_ECN.  All TSO packets with CWR set would
      have a gso_type of SKB_GSO_TCPV4 | SKB_GSO_TCPV4_ECN while all other TSO
      packets would be SKB_GSO_TCPV4.  This means that only the CWR packets need
      to be emulated in software.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7967168c
  11. 18 6月, 2006 5 次提交
  12. 26 4月, 2006 1 次提交
  13. 31 3月, 2006 1 次提交
  14. 21 3月, 2006 3 次提交
  15. 04 1月, 2006 4 次提交
  16. 16 11月, 2005 1 次提交
  17. 11 11月, 2005 5 次提交