1. 11 6月, 2009 1 次提交
    • E
      net: No more expensive sock_hold()/sock_put() on each tx · 2b85a34e
      Eric Dumazet 提交于
      One of the problem with sock memory accounting is it uses
      a pair of sock_hold()/sock_put() for each transmitted packet.
      
      This slows down bidirectional flows because the receive path
      also needs to take a refcount on socket and might use a different
      cpu than transmit path or transmit completion path. So these
      two atomic operations also trigger cache line bounces.
      
      We can see this in tx or tx/rx workloads (media gateways for example),
      where sock_wfree() can be in top five functions in profiles.
      
      We use this sock_hold()/sock_put() so that sock freeing
      is delayed until all tx packets are completed.
      
      As we also update sk_wmem_alloc, we could offset sk_wmem_alloc
      by one unit at init time, until sk_free() is called.
      Once sk_free() is called, we atomic_dec_and_test(sk_wmem_alloc)
      to decrement initial offset and atomicaly check if any packets
      are in flight.
      
      skb_set_owner_w() doesnt call sock_hold() anymore
      
      sock_wfree() doesnt call sock_put() anymore, but check if sk_wmem_alloc
      reached 0 to perform the final freeing.
      
      Drawback is that a skb->truesize error could lead to unfreeable sockets, or
      even worse, prematurely calling __sk_free() on a live socket.
      
      Nice speedups on SMP. tbench for example, going from 2691 MB/s to 2711 MB/s
      on my 8 cpu dev machine, even if tbench was not really hitting sk_refcnt
      contention point. 5 % speedup on a UDP transmit workload (depends
      on number of flows), lowering TX completion cpu usage.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b85a34e
  2. 09 6月, 2009 1 次提交
  3. 03 6月, 2009 1 次提交
  4. 27 4月, 2009 1 次提交
  5. 06 2月, 2009 1 次提交
  6. 11 12月, 2008 1 次提交
  7. 29 10月, 2008 1 次提交
  8. 09 10月, 2008 5 次提交
  9. 10 9月, 2008 1 次提交
    • N
      ipv6: Fix OOPS in ip6_dst_lookup_tail(). · e550dfb0
      Neil Horman 提交于
      This fixes kernel bugzilla 11469: "TUN with 1024 neighbours:
      ip6_dst_lookup_tail NULL crash"
      
      dst->neighbour is not necessarily hooked up at this point
      in the processing path, so blindly dereferencing it is
      the wrong thing to do.  This NULL check exists in other
      similar paths and this case was just an oversight.
      
      Also fix the completely wrong and confusing indentation
      here while we're at it.
      
      Based upon a patch by Evgeniy Polyakov.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e550dfb0
  10. 15 8月, 2008 1 次提交
  11. 04 8月, 2008 1 次提交
  12. 01 8月, 2008 1 次提交
  13. 26 7月, 2008 1 次提交
  14. 20 7月, 2008 1 次提交
  15. 03 7月, 2008 2 次提交
  16. 20 6月, 2008 1 次提交
  17. 12 6月, 2008 1 次提交
  18. 13 5月, 2008 1 次提交
  19. 12 4月, 2008 1 次提交
    • Y
      [IPV6]: Make address arguments const. · 9acd9f3a
      YOSHIFUJI Hideaki 提交于
      - net/ipv6/addrconf.c:
      	ipv6_get_ifaddr(), ipv6_dev_get_saddr()
      - net/ipv6/mcast.c:
      	ipv6_sock_mc_join(), ipv6_sock_mc_drop(),
      	inet6_mc_check(),
      	ipv6_dev_mc_inc(), __ipv6_dev_mc_dec(), ipv6_dev_mc_dec(),
      	ipv6_chk_mcast_addr()
      - net/ipv6/route.c:
      	rt6_lookup(), icmp6_dst_alloc()
      - net/ipv6/ip6_output.c:
      	ip6_nd_hdr()
      - net/ipv6/ndisc.c:
      	ndisc_send_ns(), ndisc_send_rs(), ndisc_send_redirect(),
      	ndisc_get_neigh(), __ndisc_send()
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      9acd9f3a
  20. 05 4月, 2008 1 次提交
  21. 26 3月, 2008 2 次提交
  22. 25 3月, 2008 3 次提交
  23. 08 3月, 2008 1 次提交
  24. 06 3月, 2008 2 次提交
  25. 04 3月, 2008 1 次提交
  26. 29 2月, 2008 1 次提交
  27. 15 2月, 2008 1 次提交
  28. 13 2月, 2008 1 次提交
    • H
      [IPV6]: Fix IPsec datagram fragmentation · 28a89453
      Herbert Xu 提交于
      This is a long-standing bug in the IPsec IPv6 code that breaks
      when we emit a IPsec tunnel-mode datagram packet.  The problem
      is that the code the emits the packet assumes the IPv6 stack
      will fragment it later, but the IPv6 stack assumes that whoever
      is emitting the packet is going to pre-fragment the packet.
      
      In the long term we need to fix both sides, e.g., to get the
      datagram code to pre-fragment as well as to get the IPv6 stack
      to fragment locally generated tunnel-mode packet.
      
      For now this patch does the second part which should make it
      work for the IPsec host case.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28a89453
  29. 01 2月, 2008 2 次提交
  30. 29 1月, 2008 1 次提交