1. 23 9月, 2006 2 次提交
  2. 23 8月, 2006 1 次提交
  3. 08 8月, 2006 1 次提交
  4. 01 7月, 2006 1 次提交
  5. 30 6月, 2006 1 次提交
    • M
      [NET]: Add ECN support for TSO · b0da8537
      Michael Chan 提交于
      In the current TSO implementation, NETIF_F_TSO and ECN cannot be
      turned on together in a TCP connection.  The problem is that most
      hardware that supports TSO does not handle CWR correctly if it is set
      in the TSO packet.  Correct handling requires CWR to be set in the
      first packet only if it is set in the TSO header.
      
      This patch adds the ability to turn on NETIF_F_TSO and ECN using
      GSO if necessary to handle TSO packets with CWR set.  Hardware
      that handles CWR correctly can turn on NETIF_F_TSO_ECN in the dev->
      features flag.
      
      All TSO packets with CWR set will have the SKB_GSO_TCPV4_ECN set.  If
      the output device does not have the NETIF_F_TSO_ECN feature set, GSO
      will split the packet up correctly with CWR only set in the first
      segment.
      
      With help from Herbert Xu <herbert@gondor.apana.org.au>.
      
      Since ECN can always be enabled with TSO, the SOCK_NO_LARGESEND sock
      flag is completely removed.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0da8537
  6. 23 6月, 2006 1 次提交
    • 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
  7. 18 6月, 2006 1 次提交
  8. 06 6月, 2006 1 次提交
    • H
      [TCP]: Avoid skb_pull if possible when trimming head · f2911969
      Herbert Xu ~{PmVHI~} 提交于
      Trimming the head of an skb by calling skb_pull can cause the packet
      to become unaligned if the length pulled is odd.  Since the length is
      entirely arbitrary for a FIN packet carrying data, this is actually
      quite common.
      
      Unaligned data is not the end of the world, but we should avoid it if
      it's easily done.  In this case it is trivial.  Since we're discarding
      all of the head data it doesn't matter whether we move skb->data forward
      or back.
      
      However, it is still possible to have unaligned skb->data in general.
      So network drivers should be prepared to handle it instead of crashing.
      
      This patch also adds an unlikely marking on len < headlen since partial
      ACKs on head data are extremely rare in the wild.  As the return value
      of __pskb_trim_head is no longer ever NULL that has been removed.
      Signed-off-by: NHerbert Xu ~{PmV&gt;HI~} <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2911969
  9. 30 4月, 2006 1 次提交
  10. 20 4月, 2006 1 次提交
  11. 19 4月, 2006 1 次提交
    • H
      [TCP]: Fix truesize underflow · ef5cb973
      Herbert Xu 提交于
      There is a problem with the TSO packet trimming code.  The cause of
      this lies in the tcp_fragment() function.
      
      When we allocate a fragment for a completely non-linear packet the
      truesize is calculated for a payload length of zero.  This means that
      truesize could in fact be less than the real payload length.
      
      When that happens the TSO packet trimming can cause truesize to become
      negative.  This in turn can cause sk_forward_alloc to be -n * PAGE_SIZE
      which would trigger the warning.
      
      I've copied the code DaveM used in tso_fragment which should work here.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef5cb973
  12. 15 4月, 2006 1 次提交
    • A
      [IPV4]: Possible cleanups. · 6c97e72a
      Adrian Bunk 提交于
      This patch contains the following possible cleanups:
      - make the following needlessly global function static:
        - arp.c: arp_rcv()
      - remove the following unused EXPORT_SYMBOL's:
        - devinet.c: devinet_ioctl
        - fib_frontend.c: ip_rt_ioctl
        - inet_hashtables.c: inet_bind_bucket_create
        - inet_hashtables.c: inet_bind_hash
        - tcp_input.c: sysctl_tcp_abc
        - tcp_ipv4.c: sysctl_tcp_tw_reuse
        - tcp_output.c: sysctl_tcp_mtu_probing
        - tcp_output.c: sysctl_tcp_base_mss
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c97e72a
  13. 21 3月, 2006 3 次提交
  14. 12 3月, 2006 1 次提交
  15. 04 1月, 2006 3 次提交
  16. 07 12月, 2005 1 次提交
    • D
      [TCP] Vegas: timestamp before clone · dfb4b9dc
      David S. Miller 提交于
      We have to store the congestion control timestamp on the SKB before we
      clone it, not after.  Else we get no timestamping information at all.
      
      tcp_transmit_skb() has been reworked so that we can do the timestamp
      still in one spot, instead of at all the call sites.
      
      Problem discovered, and initial fix, from Tom Young
      <tyo@ee.unimelb.edu.au>.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dfb4b9dc
  17. 11 11月, 2005 3 次提交
  18. 21 10月, 2005 1 次提交
  19. 14 10月, 2005 1 次提交
  20. 13 10月, 2005 1 次提交
  21. 09 10月, 2005 1 次提交
  22. 30 9月, 2005 1 次提交
    • D
      [TCP]: Revert 6b251858 · 01ff367e
      David S. Miller 提交于
      But retain the comment fix.
      
      Alexey Kuznetsov has explained the situation as follows:
      
      --------------------
      
      I think the fix is incorrect. Look, the RFC function init_cwnd(mss) is
      not continuous: f.e. for mss=1095 it needs initial window 1095*4, but
      for mss=1096 it is 1096*3. We do not know exactly what mss sender used
      for calculations. If we advertised 1096 (and calculate initial window
      3*1096), the sender could limit it to some value < 1096 and then it
      will need window his_mss*4 > 3*1096 to send initial burst.
      
      See?
      
      So, the honest function for inital rcv_wnd derived from
      tcp_init_cwnd() is:
      
      	init_rcv_wnd(mss)=
      	  min { init_cwnd(mss1)*mss1 for mss1 <= mss }
      
      It is something sort of:
      
      	if (mss < 1096)
      		return mss*4;
      	if (mss < 1096*2)
      		return 1096*4;
      	return mss*2;
      
      (I just scrablled a graph of piece of paper, it is difficult to see or
      to explain without this)
      
      I selected it differently giving more window than it is strictly
      required.  Initial receive window must be large enough to allow sender
      following to the rfc (or just setting initial cwnd to 2) to send
      initial burst.  But besides that it is arbitrary, so I decided to give
      slack space of one segment.
      
      Actually, the logic was:
      
      If mss is low/normal (<=ethernet), set window to receive more than
      initial burst allowed by rfc under the worst conditions
      i.e. mss*4. This gives slack space of 1 segment for ethernet frames.
      
      For msses slighlty more than ethernet frame, take 3. Try to give slack
      space of 1 frame again.
      
      If mss is huge, force 2*mss. No slack space.
      
      Value 1460*3 is really confusing. Minimal one is 1096*2, but besides
      that it is an arbitrary value. It was meant to be ~4096. 1460*3 is
      just the magic number from RFC, 1460*3 = 1095*4 is the magic :-), so
      that I guess hands typed this themselves.
      
      --------------------
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01ff367e
  23. 29 9月, 2005 1 次提交
  24. 23 9月, 2005 1 次提交
    • H
      [TCP]: Adjust Reno SACK estimate in tcp_fragment · 83ca28be
      Herbert Xu 提交于
      Since the introduction of TSO pcount a year ago, it has been possible
      for tcp_fragment() to cause packets_out to decrease.  Prior to that,
      tcp_retrans_try_collapse() was the only way for that to happen on the
      retransmission path.
      
      When this happens with Reno, it is possible for sasked_out to become
      invalid because it is only an estimate and not tied to any particular
      packet on the retransmission queue.
      
      Therefore we need to adjust sacked_out as well as left_out in the Reno
      case.  The following patch does exactly that.
      
      This bug is pretty difficult to trigger in practice though since you
      need a SACKless peer with a retransmission that occurs just as the
      cached MTU value expires.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83ca28be
  25. 20 9月, 2005 1 次提交
  26. 15 9月, 2005 1 次提交
  27. 11 9月, 2005 1 次提交
  28. 09 9月, 2005 1 次提交
  29. 02 9月, 2005 1 次提交
  30. 30 8月, 2005 4 次提交