1. 29 11月, 2010 1 次提交
  2. 09 11月, 2010 1 次提交
  3. 08 9月, 2010 1 次提交
  4. 23 8月, 2010 1 次提交
  5. 01 7月, 2010 1 次提交
    • C
      fragment: add fast path for in-order fragments · d6bebca9
      Changli Gao 提交于
      add fast path for in-order fragments
      
      As the fragments are sent in order in most of OSes, such as Windows, Darwin and
      FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue.
      In the fast path, we check if the skb at the end of the inet_frag_queue is the
      prev we expect.
      Signed-off-by: NChangli Gao <xiaosuo@gmail.com>
      ----
       include/net/inet_frag.h |    1 +
       net/ipv4/ip_fragment.c  |   12 ++++++++++++
       net/ipv6/reassembly.c   |   11 +++++++++++
       3 files changed, 24 insertions(+)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d6bebca9
  6. 16 6月, 2010 2 次提交
  7. 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
  8. 19 2月, 2010 1 次提交
  9. 16 2月, 2010 1 次提交
  10. 20 1月, 2010 1 次提交
  11. 18 1月, 2010 1 次提交
  12. 19 12月, 2009 1 次提交
    • Y
      ipv6: fix an oops when force unload ipv6 module · 3705e11a
      Yang Hongyang 提交于
      When I do an ipv6 module force unload,I got the following oops:
      #rmmod -f ipv6
      ------------[ cut here ]------------
      kernel BUG at mm/slub.c:2969!
      invalid opcode: 0000 [#1] SMP
      last sysfs file: /sys/devices/pci0000:00/0000:00:11.0/0000:02:03.0/net/eth2/ifindex
      Modules linked in: ipv6(-) dm_multipath uinput ppdev tpm_tis tpm tpm_bios pcspkr pcnet32 mii parport_pc i2c_piix4 parport i2c_core floppy mptspi mptscsih mptbase scsi_transport_spi
      
      Pid: 2530, comm: rmmod Tainted: G  R        2.6.32 #2 440BX Desktop Reference Platform/VMware Virtual Platform
      EIP: 0060:[<c04b73f2>] EFLAGS: 00010246 CPU: 0
      EIP is at kfree+0x6a/0xdd
      EAX: 00000000 EBX: c09e86bc ECX: c043e4dd EDX: c14293e0
      ESI: e141f1d8 EDI: e140fc31 EBP: dec58ef0 ESP: dec58ed0
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process rmmod (pid: 2530, ti=dec58000 task=decb1940 task.ti=dec58000)
      Stack:
       c14293e0 00000282 df624240 c0897d08 c09e86bc c09e86bc e141f1d8 dec58f1c
      <0> dec58f00 e140fc31 c09e84c4 e141f1bc dec58f14 c0689d21 dec58f1c e141f1bc
      <0> 00000000 dec58f2c c0689eff c09e84d8 c09e84d8 e141f1bc bff33a90 dec58f38
      Call Trace:
       [<e140fc31>] ? ipv6_frags_exit_net+0x22/0x32 [ipv6]
       [<c0689d21>] ? ops_exit_list+0x19/0x3d
       [<c0689eff>] ? unregister_pernet_operations+0x2a/0x51
       [<c0689f70>] ? unregister_pernet_subsys+0x17/0x24
       [<e140fbfe>] ? ipv6_frag_exit+0x21/0x32 [ipv6]
       [<e141a361>] ? inet6_exit+0x47/0x122 [ipv6]
       [<c045f5de>] ? sys_delete_module+0x198/0x1f6
       [<c04a8acf>] ? remove_vma+0x57/0x5d
       [<c070f63f>] ? do_page_fault+0x2e7/0x315
       [<c0403218>] ? sysenter_do_call+0x12/0x28
      Code: 86 00 00 00 40 c1 e8 0c c1 e0 05 01 d0 89 45 e0 66 83 38 00 79 06 8b 40 0c 89 45 e0 8b 55 e0 8b 02 84 c0 78 14 66 a9 00 c0 75 04 <0f> 0b eb fe 8b 45 e0 e8 35 15 fe ff eb 5d 8b 45 04 8b 55 e0 89
      EIP: [<c04b73f2>] kfree+0x6a/0xdd SS:ESP 0068:dec58ed0
      ---[ end trace 4475d1a5b0afa7e5 ]---
      
      It's because in ip6_frags_ns_sysctl_register,
      "table" only alloced when "net" is not equals
      to "init_net".So when we free "table" in 
      ip6_frags_ns_sysctl_unregister,we should check
      this first.
      
      This patch fix the problem.
      Signed-off-by: NYang Hongyang <yanghy@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3705e11a
  13. 15 12月, 2009 1 次提交
    • P
      ipv6: reassembly: use seperate reassembly queues for conntrack and local delivery · 0b5ccb2e
      Patrick McHardy 提交于
      Currently the same reassembly queue might be used for packets reassembled
      by conntrack in different positions in the stack (PREROUTING/LOCAL_OUT),
      as well as local delivery. This can cause "packet jumps" when the fragment
      completing a reassembled packet is queued from a different position in the
      stack than the previous ones.
      
      Add a "user" identifier to the reassembly queue key to seperate the queues
      of each caller, similar to what we do for IPv4.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      0b5ccb2e
  14. 26 11月, 2009 1 次提交
  15. 12 11月, 2009 1 次提交
    • E
      sysctl net: Remove unused binary sysctl code · f8572d8f
      Eric W. Biederman 提交于
      Now that sys_sysctl is a compatiblity wrapper around /proc/sys
      all sysctl strategy routines, and all ctl_name and strategy
      entries in the sysctl tables are unused, and can be
      revmoed.
      
      In addition neigh_sysctl_register has been modified to no longer
      take a strategy argument and it's callers have been modified not
      to pass one.
      
      Cc: "David Miller" <davem@davemloft.net>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      f8572d8f
  16. 06 11月, 2009 1 次提交
  17. 15 9月, 2009 1 次提交
  18. 09 6月, 2009 1 次提交
  19. 03 6月, 2009 1 次提交
  20. 19 3月, 2009 1 次提交
  21. 04 11月, 2008 1 次提交
    • A
      net: '&' redux · 6d9f239a
      Alexey Dobriyan 提交于
      I want to compile out proc_* and sysctl_* handlers totally and
      stub them to NULL depending on config options, however usage of &
      will prevent this, since taking adress of NULL pointer will break
      compilation.
      
      So, drop & in front of every ->proc_handler and every ->strategy
      handler, it was never needed in fact.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d9f239a
  22. 09 10月, 2008 4 次提交
  23. 01 10月, 2008 1 次提交
    • I
      ipv6: almost identical frag hashing funcs combined · 93c8b90f
      Ilpo Järvinen 提交于
      $ diff-funcs ip6qhashfn reassembly.c netfilter/nf_conntrack_reasm.c
       --- reassembly.c:ip6qhashfn()
       +++ netfilter/nf_conntrack_reasm.c:ip6qhashfn()
      @@ -1,5 +1,5 @@
      -static unsigned int ip6qhashfn(__be32 id, struct in6_addr *saddr,
      -			       struct in6_addr *daddr)
      +static unsigned int ip6qhashfn(__be32 id, const struct in6_addr *saddr,
      +			       const struct in6_addr *daddr)
       {
       	u32 a, b, c;
      
      @@ -9,7 +9,7 @@
      
       	a += JHASH_GOLDEN_RATIO;
       	b += JHASH_GOLDEN_RATIO;
      -	c += ip6_frags.rnd;
      +	c += nf_frags.rnd;
       	__jhash_mix(a, b, c);
      
       	a += (__force u32)saddr->s6_addr32[3];
      
      And codiff xx.o.old xx.o.new:
      
      net/ipv6/netfilter/nf_conntrack_reasm.c:
        ip6qhashfn         | -512
        nf_hashfn          |   +6
        nf_ct_frag6_gather |  +36
       3 functions changed, 42 bytes added, 512 bytes removed, diff: -470
      net/ipv6/reassembly.c:
        ip6qhashfn    | -512
        ip6_hashfn    |   +7
        ipv6_frag_rcv |  +89
       3 functions changed, 96 bytes added, 512 bytes removed, diff: -416
      
      net/ipv6/reassembly.c:
        inet6_hash_frag | +510
       1 function changed, 510 bytes added, diff: +510
      
      Total: -376
      
      Compile tested.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93c8b90f
  24. 26 7月, 2008 1 次提交
  25. 28 6月, 2008 1 次提交
  26. 12 6月, 2008 1 次提交
  27. 20 5月, 2008 3 次提交
  28. 03 5月, 2008 1 次提交
  29. 29 3月, 2008 1 次提交
  30. 26 3月, 2008 1 次提交
  31. 29 1月, 2008 4 次提交