1. 27 3月, 2010 4 次提交
  2. 22 3月, 2010 3 次提交
  3. 21 3月, 2010 1 次提交
    • S
      NET_DMA: free skbs periodically · 73852e81
      Steven J. Magnani 提交于
      Under NET_DMA, data transfer can grind to a halt when userland issues a
      large read on a socket with a high RCVLOWAT (i.e., 512 KB for both).
      This appears to be because the NET_DMA design queues up lots of memcpy
      operations, but doesn't issue or wait for them (and thus free the
      associated skbs) until it is time for tcp_recvmesg() to return.
      The socket hangs when its TCP window goes to zero before enough data is
      available to satisfy the read.
      
      Periodically issue asynchronous memcpy operations, and free skbs for ones
      that have completed, to prevent sockets from going into zero-window mode.
      Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73852e81
  4. 20 3月, 2010 4 次提交
  5. 19 3月, 2010 1 次提交
  6. 17 3月, 2010 1 次提交
  7. 12 3月, 2010 1 次提交
    • D
      ipconfig: Handle devices which take some time to come up. · 964ad81c
      David S. Miller 提交于
      Some network devices, particularly USB ones, take several seconds to
      fully init and appear in the device list.
      
      If the user turned ipconfig on, they are using it for NFS root or some
      other early booting purpose.  So it makes no sense to just flat out
      fail immediately if the device isn't found.
      
      It also doesn't make sense to just jack up the initial wait to
      something crazy like 10 seconds.
      
      Instead, poll immediately, and then periodically once a second,
      waiting for a usable device to appear.  Fail after 12 seconds.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Tested-by: NChristian Pellegrin <chripell@fsfe.org>
      964ad81c
  8. 10 3月, 2010 1 次提交
  9. 09 3月, 2010 3 次提交
    • E
      tcp: Fix tcp_make_synack() · 28b2774a
      Eric Dumazet 提交于
      Commit 4957faad (TCPCT part 1g: Responder Cookie => Initiator), part
      of TCP_COOKIE_TRANSACTION implementation, forgot to correctly size
      synack skb in case user data must be included.
      
      Many thanks to Mika Pentillä for spotting this error.
      Reported-by: NPenttillä Mika <mika.penttila@ixonos.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28b2774a
    • E
      net: fix route cache rebuilds · 98376387
      Eric Dumazet 提交于
      We added an automatic route cache rebuilding in commit 1080d709
      but had to correct few bugs. One of the assumption of original patch,
      was that entries where kept sorted in a given way.
      
      This assumption is known to be wrong (commit 1ddbcb00 gave an
      explanation of this and corrected a leak) and expensive to respect.
      
      Paweł Staszewski reported to me one of his machine got its routing cache
      disabled after few messages like :
      
      [ 2677.850065] Route hash chain too long!
      [ 2677.850080] Adjust your secret_interval!
      [82839.662993] Route hash chain too long!
      [82839.662996] Adjust your secret_interval!
      [155843.731650] Route hash chain too long!
      [155843.731664] Adjust your secret_interval!
      [155843.811881] Route hash chain too long!
      [155843.811891] Adjust your secret_interval!
      [155843.858209] vlan0811: 5 rebuilds is over limit, route caching
      disabled
      [155843.858212] Route hash chain too long!
      [155843.858213] Adjust your secret_interval!
      
      This is because rt_intern_hash() might be fooled when computing a chain
      length, because multiple entries with same keys can differ because of
      TOS (or mark/oif) bits.
      
      In the rare case the fast algorithm see a too long chain, and before
      taking expensive path, we call a helper function in order to not count
      duplicates of same routes, that only differ with tos/mark/oif bits. This
      helper works with data already in cpu cache and is not be very
      expensive, despite its O(N^2) implementation.
      
      Paweł Staszewski sucessfully tested this patch on his loaded router.
      Reported-and-tested-by: NPaweł Staszewski <pstaszewski@itcare.pl>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98376387
    • E
      tcp: Add SNMP counters for backlog and min_ttl drops · 6cce09f8
      Eric Dumazet 提交于
      Commit 6b03a53a (tcp: use limited socket backlog) added the possibility
      of dropping frames when backlog queue is full.
      
      Commit d218d111 (tcp: Generalized TTL Security Mechanism) added the
      possibility of dropping frames when TTL is under a given limit.
      
      This patch adds new SNMP MIB entries, named TCPBacklogDrop and
      TCPMinTTLDrop, published in /proc/net/netstat in TcpExt: line
      
      netstat -s | egrep "TCPBacklogDrop|TCPMinTTLDrop"
          TCPBacklogDrop: 0
          TCPMinTTLDrop: 0
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cce09f8
  10. 06 3月, 2010 3 次提交
  11. 04 3月, 2010 1 次提交
    • T
      gre: fix hard header destination address checking · 6d55cb91
      Timo Teräs 提交于
      ipgre_header() can be called with zero daddr when the gre device is
      configured as multipoint tunnel and still has the NOARP flag set (which is
      typically cleared by the userspace arp daemon).  If the NOARP packets are
      not dropped, ipgre_tunnel_xmit() will take rt->rt_gateway (= NBMA IP) and
      use that for route look up (and may lead to bogus xfrm acquires).
      
      The multicast address check is removed as sending to multicast group should
      be ok.  In fact, if gre device has a multicast address as destination
      ipgre_header is always called with multicast address.
      Signed-off-by: NTimo Teras <timo.teras@iki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d55cb91
  12. 03 3月, 2010 1 次提交
  13. 27 2月, 2010 1 次提交
  14. 25 2月, 2010 6 次提交
  15. 23 2月, 2010 1 次提交
  16. 20 2月, 2010 1 次提交
    • E
      net: Fix sysctl restarts... · 88af182e
      Eric W. Biederman 提交于
      Yuck.  It turns out that when we restart sysctls we were restarting
      with the values already changed.  Which unfortunately meant that
      the second time through we thought there was no change and skipped
      all kinds of work, despite the fact that there was indeed a change.
      
      I have fixed this the simplest way possible by restoring the changed
      values when we restart the sysctl write.
      
      One of my coworkers spotted this bug when after disabling forwarding
      on an interface pings were still forwarded.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88af182e
  17. 19 2月, 2010 4 次提交
  18. 18 2月, 2010 1 次提交
  19. 17 2月, 2010 2 次提交
    • T
      percpu: add __percpu sparse annotations to net · 7d720c3e
      Tejun Heo 提交于
      Add __percpu sparse annotations to net.
      
      These annotations are to make sparse consider percpu variables to be
      in a different address space and warn if accessed without going
      through percpu accessors.  This patch doesn't affect normal builds.
      
      The macro and type tricks around snmp stats make things a bit
      interesting.  DEFINE/DECLARE_SNMP_STAT() macros mark the target field
      as __percpu and SNMP_UPD_PO_STATS() macro is updated accordingly.  All
      snmp_mib_*() users which used to cast the argument to (void **) are
      updated to cast it to (void __percpu **).
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Vlad Yasevich <vladislav.yasevich@hp.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d720c3e
    • E
      net neigh: Decouple per interface neighbour table controls from binary sysctls · 54716e3b
      Eric W. Biederman 提交于
      Stop computing the number of neighbour table settings we have by
      counting the number of binary sysctls.  This behaviour was silly
      and meant that we could not add another neighbour table setting
      without also adding another binary sysctl.
      
      Don't pass the binary sysctl path for neighour table entries
      into neigh_sysctl_register.  These parameters are no longer
      used and so are just dead code.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54716e3b