1. 19 8月, 2010 1 次提交
  2. 03 8月, 2010 1 次提交
  3. 13 7月, 2010 1 次提交
  4. 08 7月, 2010 1 次提交
  5. 06 7月, 2010 1 次提交
  6. 22 6月, 2010 1 次提交
  7. 11 6月, 2010 1 次提交
  8. 18 5月, 2010 1 次提交
  9. 20 4月, 2010 1 次提交
  10. 19 4月, 2010 2 次提交
  11. 16 4月, 2010 2 次提交
    • S
      net: replace ipfragok with skb->local_df · 4e15ed4d
      Shan Wei 提交于
      As Herbert Xu said: we should be able to simply replace ipfragok
      with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
      has droped ipfragok and set local_df value properly.
      
      The patch kills the ipfragok parameter of .queue_xmit().
      Signed-off-by: NShan Wei <shanwei@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e15ed4d
    • E
      ip: Fix ip_dev_loopback_xmit() · e30b38c2
      Eric Dumazet 提交于
      Eric Paris got following trace with a linux-next kernel
      
      [   14.203970] BUG: using smp_processor_id() in preemptible [00000000]
      code: avahi-daemon/2093
      [   14.204025] caller is netif_rx+0xfa/0x110
      [   14.204035] Call Trace:
      [   14.204064]  [<ffffffff81278fe5>] debug_smp_processor_id+0x105/0x110
      [   14.204070]  [<ffffffff8142163a>] netif_rx+0xfa/0x110
      [   14.204090]  [<ffffffff8145b631>] ip_dev_loopback_xmit+0x71/0xa0
      [   14.204095]  [<ffffffff8145b892>] ip_mc_output+0x192/0x2c0
      [   14.204099]  [<ffffffff8145d610>] ip_local_out+0x20/0x30
      [   14.204105]  [<ffffffff8145d8ad>] ip_push_pending_frames+0x28d/0x3d0
      [   14.204119]  [<ffffffff8147f1cc>] udp_push_pending_frames+0x14c/0x400
      [   14.204125]  [<ffffffff814803fc>] udp_sendmsg+0x39c/0x790
      [   14.204137]  [<ffffffff814891d5>] inet_sendmsg+0x45/0x80
      [   14.204149]  [<ffffffff8140af91>] sock_sendmsg+0xf1/0x110
      [   14.204189]  [<ffffffff8140dc6c>] sys_sendmsg+0x20c/0x380
      [   14.204233]  [<ffffffff8100ad82>] system_call_fastpath+0x16/0x1b
      
      While current linux-2.6 kernel doesnt emit this warning, bug is latent
      and might cause unexpected failures.
      
      ip_dev_loopback_xmit() runs in process context, preemption enabled, so
      must call netif_rx_ni() instead of netif_rx(), to make sure that we
      process pending software interrupt.
      
      Same change for ip6_dev_loopback_xmit()
      Reported-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e30b38c2
  12. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  13. 25 3月, 2010 1 次提交
  14. 07 1月, 2010 1 次提交
    • O
      ip: fix mc_loop checks for tunnels with multicast outer addresses · 7ad6848c
      Octavian Purdila 提交于
      When we have L3 tunnels with different inner/outer families
      (i.e. IPV4/IPV6) which use a multicast address as the outer tunnel
      destination address, multicast packets will be loopbacked back to the
      sending socket even if IP*_MULTICAST_LOOP is set to disabled.
      
      The mc_loop flag is present in the family specific part of the socket
      (e.g. the IPv4 or IPv4 specific part).  setsockopt sets the inner
      family mc_loop flag. When the packet is pushed through the L3 tunnel
      it will eventually be processed by the outer family which if different
      will check the flag in a different part of the socket then it was set.
      Signed-off-by: NOctavian Purdila <opurdila@ixiacom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ad6848c
  15. 02 12月, 2009 1 次提交
  16. 24 11月, 2009 1 次提交
  17. 19 10月, 2009 1 次提交
    • E
      inet: rename some inet_sock fields · c720c7e8
      Eric Dumazet 提交于
      In order to have better cache layouts of struct sock (separate zones
      for rx/tx paths), we need this preliminary patch.
      
      Goal is to transfert fields used at lookup time in the first
      read-mostly cache line (inside struct sock_common) and move sk_refcnt
      to a separate cache line (only written by rx path)
      
      This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
      sport and id fields. This allows a future patch to define these
      fields as macros, like sk_refcnt, without name clashes.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c720c7e8
  18. 02 10月, 2009 1 次提交
  19. 03 9月, 2009 1 次提交
    • E
      ip: Report qdisc packet drops · 6ce9e7b5
      Eric Dumazet 提交于
      Christoph Lameter pointed out that packet drops at qdisc level where not
      accounted in SNMP counters. Only if application sets IP_RECVERR, drops
      are reported to user (-ENOBUFS errors) and SNMP counters updated.
      
      IP_RECVERR is used to enable extended reliable error message passing,
      but these are not needed to update system wide SNMP stats.
      
      This patch changes things a bit to allow SNMP counters to be updated,
      regardless of IP_RECVERR being set or not on the socket.
      
      Example after an UDP tx flood
      # netstat -s 
      ...
      IP:
          1487048 outgoing packets dropped
      ...
      Udp:
      ...
          SndbufErrors: 1487048
      
      
      send() syscalls, do however still return an OK status, to not
      break applications.
      
      Note : send() manual page explicitly says for -ENOBUFS error :
      
       "The output queue for a network interface was full.
        This generally indicates that the interface has stopped sending,
        but may be caused by transient congestion.
        (Normally, this does not occur in Linux. Packets are just silently
        dropped when a device queue overflows.) "
      
      This is not true for IP_RECVERR enabled sockets : a send() syscall
      that hit a qdisc drop returns an ENOBUFS error.
      
      Many thanks to Christoph, David, and last but not least, Alexey !
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ce9e7b5
  20. 28 8月, 2009 1 次提交
  21. 12 7月, 2009 1 次提交
  22. 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
  23. 09 6月, 2009 1 次提交
  24. 03 6月, 2009 2 次提交
  25. 27 4月, 2009 1 次提交
  26. 16 2月, 2009 1 次提交
  27. 25 11月, 2008 2 次提交
    • E
      net: avoid a pair of dst_hold()/dst_release() in ip_push_pending_frames() · a21bba94
      Eric Dumazet 提交于
      We can reduce pressure on dst entry refcount that slowdown UDP transmit
      path on SMP machines. This pressure is visible on RTP servers when
      delivering content to mediagateways, especially big ones, handling
      thousand of streams. Several cpus send UDP frames to the same
      destination, hence use the same dst entry.
      
      This patch makes ip_push_pending_frames() steal the refcount its
      callers had to take when filling inet->cork.dst.
      
      This doesnt avoid all refcounting, but still gives speedups on SMP,
      on UDP/RAW transmit path.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a21bba94
    • E
      net: avoid a pair of dst_hold()/dst_release() in ip_append_data() · 2e77d89b
      Eric Dumazet 提交于
      We can reduce pressure on dst entry refcount that slowdown UDP transmit
      path on SMP machines. This pressure is visible on RTP servers when
      delivering content to mediagateways, especially big ones, handling
      thousand of streams. Several cpus send UDP frames to the same
      destination, hence use the same dst entry.
      
      This patch makes ip_append_data() eventually steal the refcount its
      callers had to take on the dst entry.
      
      This doesnt avoid all refcounting, but still gives speedups on SMP,
      on UDP/RAW transmit path
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e77d89b
  28. 03 11月, 2008 1 次提交
  29. 01 10月, 2008 1 次提交
  30. 26 7月, 2008 1 次提交
  31. 17 7月, 2008 1 次提交
  32. 15 7月, 2008 1 次提交
  33. 12 6月, 2008 1 次提交
  34. 30 4月, 2008 1 次提交
    • K
      [IPv4] UFO: prevent generation of chained skb destined to UFO device · be9164e7
      Kostya B 提交于
      Problem: ip_append_data() could wrongly generate a chained skb for
      devices which support UFO.  When sk_write_queue is not empty
      (e.g. MSG_MORE), __instead__ of appending data into the next nr_frag
      of the queued skb, a new chained skb is created.
      
      I would normally assume UFO device should get data in nr_frags and not
      in frag_list.  Later the udp4_hwcsum_outgoing() resets csum to NONE
      and skb_gso_segment() has oops.
      
      Proposal:
      1. Even length is less than mtu, employ ip_ufo_append_data()
      and append data to the __existed__ skb in the sk_write_queue.
      
      2. ip_ufo_append_data() is fixed due to a wrong manipulation of
      peek-ing and later enqueue-ing of the same skb.  Now, enqueuing is
      always performed, because on error the further
      ip_flush_pending_frames() would release the queued skb.
      Signed-off-by: NKostya B <bkostya@hotmail.com>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be9164e7
  35. 26 3月, 2008 1 次提交
  36. 25 3月, 2008 1 次提交