1. 26 4月, 2007 11 次提交
  2. 11 2月, 2007 1 次提交
  3. 09 2月, 2007 3 次提交
  4. 26 1月, 2007 1 次提交
    • B
      [TCP]: Fix sorting of SACK blocks. · db3ccdac
      Baruch Even 提交于
      The sorting of SACK blocks actually munges them rather than sort,
      causing the TCP stack to ignore some SACK information and breaking the
      assumption of ordered SACK blocks after sorting.
      
      The sort takes the data from a second buffer which isn't moved causing
      subsequent data moves to occur from the wrong location. The fix is to
      use a temporary buffer as a normal sort does.
      Signed-off-By: NBaruch Even <baruch@ev-en.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db3ccdac
  5. 24 1月, 2007 1 次提交
    • M
      [TCP]: skb is unexpectedly freed. · fb7e2399
      Masayuki Nakagawa 提交于
      I encountered a kernel panic with my test program, which is a very
      simple IPv6 client-server program.
      
      The server side sets IPV6_RECVPKTINFO on a listening socket, and the
      client side just sends a message to the server.  Then the kernel panic
      occurs on the server.  (If you need the test program, please let me
      know. I can provide it.)
      
      This problem happens because a skb is forcibly freed in
      tcp_rcv_state_process().
      
      When a socket in listening state(TCP_LISTEN) receives a syn packet,
      then tcp_v6_conn_request() will be called from
      tcp_rcv_state_process().  If the tcp_v6_conn_request() successfully
      returns, the skb would be discarded by __kfree_skb().
      
      However, in case of a listening socket which was already set
      IPV6_RECVPKTINFO, an address of the skb will be stored in
      treq->pktopts and a ref count of the skb will be incremented in
      tcp_v6_conn_request().  But, even if the skb is still in use, the skb
      will be freed.  Then someone still using the freed skb will cause the
      kernel panic.
      
      I suggest to use kfree_skb() instead of __kfree_skb().
      Signed-off-by: NMasayuki Nakagawa <nakagawa.msy@ncos.nec.co.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb7e2399
  6. 07 12月, 2006 1 次提交
    • R
      [NET]: Memory barrier cleanups · e16aa207
      Ralf Baechle 提交于
      I believe all the below memory barriers only matter on SMP so
      therefore the smp_* variant of the barrier should be used.
      
      I'm wondering if the barrier in net/ipv4/inet_timewait_sock.c should be
      dropped entirely.  schedule_work's implementation currently implies a
      memory barrier and I think sane semantics of schedule_work() should imply
      a memory barrier, as needed so the caller shouldn't have to worry.
      It's not quite obvious why the barrier in net/packet/af_packet.c is
      needed; maybe it should be implied through flush_dcache_page?
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e16aa207
  7. 03 12月, 2006 3 次提交
  8. 04 10月, 2006 1 次提交
  9. 29 9月, 2006 3 次提交
  10. 23 9月, 2006 3 次提交
  11. 18 9月, 2006 1 次提交
  12. 30 8月, 2006 1 次提交
  13. 05 8月, 2006 1 次提交
  14. 01 7月, 2006 1 次提交
  15. 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
  16. 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
  17. 18 6月, 2006 3 次提交
  18. 12 6月, 2006 1 次提交
    • A
      [TCP]: continued: reno sacked_out count fix · 79320d7e
      Aki M Nyrhinen 提交于
      From: Aki M Nyrhinen <anyrhine@cs.helsinki.fi>
      
      IMHO the current fix to the problem (in_flight underflow in reno)
      is incorrect.  it treats the symptons but ignores the problem. the
      problem is timing out packets other than the head packet when we
      don't have sack. i try to explain (sorry if explaining the obvious).
      
      with sack, scanning the retransmit queue for timed out packets is
      fine because we know which packets in our retransmit queue have been
      acked by the receiver.
      
      without sack, we know only how many packets in our retransmit queue the
      receiver has acknowledged, but no idea which packets.
      
      think of a "typical" slow-start overshoot case, where for example
      every third packet in a window get lost because a router buffer gets
      full.
      
      with sack, we check for timeouts on those every third packet (as the
      rest have been sacked). the packet counting works out and if there
      is no reordering, we'll retransmit exactly the packets that were 
      lost.
      
      without sack, however, we check for timeout on every packet and end up
      retransmitting consecutive packets in the retransmit queue. in our
      slow-start example, 2/3 of those retransmissions are unnecessary. these
      unnecessary retransmissions eat the congestion window and evetually
      prevent fast recovery from continuing, if enough packets were lost.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79320d7e
  19. 17 5月, 2006 1 次提交
    • A
      [TCP]: reno sacked_out count fix · 8872d8e1
      Angelo P. Castellani 提交于
      From: "Angelo P. Castellani" <angelo.castellani+lkml@gmail.com>
      
      Using NewReno, if a sk_buff is timed out and is accounted as lost_out,
      it should also be removed from the sacked_out.
      
      This is necessary because recovery using NewReno fast retransmit could
      take up to a lot RTTs and the sk_buff RTO can expire without actually
      being really lost.
      
      left_out = sacked_out + lost_out
      in_flight = packets_out - left_out + retrans_out
      
      Using NewReno without this patch, on very large network losses,
      left_out becames bigger than packets_out + retrans_out (!!).
      
      For this reason unsigned integer in_flight overflows to 2^32 - something.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8872d8e1
  20. 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