1. 16 10月, 2007 2 次提交
    • H
      [SKBUFF]: Add skb_morph · e0053ec0
      Herbert Xu 提交于
      This patch creates a new function skb_morph that's just like skb_clone
      except that it lets user provide the spare skb that will be overwritten
      by the one that's to be cloned.
      
      This will be used by IP fragment reassembly so that we get back the same
      skb that went in last (rather than the head skb that we get now which
      requires us to carry around double pointers all over the place).
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0053ec0
    • H
      [SKBUFF]: Merge common code between copy_skb_header and skb_clone · dec18810
      Herbert Xu 提交于
      This patch creates a new function __copy_skb_header to merge the common
      code between copy_skb_header and skb_clone.  Having two functions which
      are largely the same is a source of wasted labour as well as confusion.
      
      In fact the tc_verd stuff is almost certainly a bug since it's treated
      differently in skb_clone compared to the callers of copy_skb_header
      (skb_copy/pskb_copy/skb_copy_expand).
      
      I've kept that difference in tact with a comment added asking for
      clarification.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dec18810
  2. 11 10月, 2007 1 次提交
  3. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  4. 11 7月, 2007 3 次提交
    • J
      [NETFILTER]: x_tables: add TRACE target · ba9dda3a
      Jozsef Kadlecsik 提交于
      The TRACE target can be used to follow IP and IPv6 packets through
      the ruleset.
      Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NPatrick NcHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba9dda3a
    • P
      [CORE] Stack changes to add multiqueue hardware support API · f25f4e44
      Peter P Waskiewicz Jr 提交于
      Add the multiqueue hardware device support API to the core network
      stack.  Allow drivers to allocate multiple queues and manage them at
      the netdev level if they choose to do so.
      
      Added a new field to sk_buff, namely queue_mapping, for drivers to
      know which tx_ring to select based on OS classification of the flow.
      Signed-off-by: NPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f25f4e44
    • P
      [SKBUFF]: Keep track of writable header len of headerless clones · 334a8132
      Patrick McHardy 提交于
      Currently NAT (and others) that want to modify cloned skbs copy them,
      even if in the vast majority of cases its not necessary because the
      skb is a clone made by TCP and the portion NAT wants to modify is
      actually writable because TCP release the header reference before
      cloning.
      
      The problem is that there is no clean way for NAT to find out how
      long the writable header area is, so this patch introduces skb->hdr_len
      to hold this length. When a headerless skb is cloned skb->hdr_len
      is set to the current headroom, for regular clones it is copied from
      the original. A new function skb_clone_writable(skb, len) returns
      whether the skb is writable up to len bytes from skb->data. To avoid
      enlarging the skb the mac_len field is reduced to 16 bit and the
      new hdr_len field is put in the remaining 16 bit.
      
      I've done a few rough benchmarks of NAT (not with this exact patch,
      but a very similar one). As expected it saves huge amounts of system
      time in case of sendfile, bringing it down to basically the same
      amount as without NAT, with sendmsg it only helps on loopback,
      probably because of the large MTU.
      
      Transmit a 1GB file using sendfile/sendmsg over eth0/lo with and
      without NAT:
      
      - sendfile eth0, no NAT:	sys     0m0.388s
      - sendfile eth0, NAT:		sys     0m1.835s
      - sendfile eth0: NAT + path:	sys     0m0.370s	(~ -80%)
      
      - sendfile lo, no NAT:		sys     0m0.258s
      - sendfile lo, NAT:		sys     0m2.609s
      - sendfile lo, NAT + patch:	sys     0m0.260s	(~ -90%)
      
      - sendmsg eth0, no NAT:		sys     0m2.508s
      - sendmsg eth0, NAT:		sys     0m2.539s
      - sendmsg eth0, NAT + patch:	sys     0m2.445s	(no change)
      
      - sendmsg lo, no NAT:		sys	0m2.151s
      - sendmsg lo, NAT:		sys     0m3.557s
      - sendmsg lo, NAT + patch:	sys     0m2.159s	(~ -40%)
      
      I expect other users can see a similar performance improvement,
      packet mangling iptables targets, ipip and ip_gre come to mind ..
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      334a8132
  5. 06 7月, 2007 1 次提交
  6. 24 6月, 2007 2 次提交
  7. 20 5月, 2007 1 次提交
    • M
      [NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error · b6ccc67d
      Mikael Pettersson 提交于
      Compiling 2.6.22-rc1 with gcc-3.2.3 for i486 fails with:
      
        gcc -m32 -Wp,-MD,net/core/.skbuff.o.d  -nostdinc -isystem /home/mikpe/pkgs/linux-x86/gnu/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -pipe -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=4  -march=i486 -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1  -Iinclude/asm-i386/mach-default -fomit-frame-pointer       -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(skbuff)"  -D"KBUILD_MODNAME=KBUILD_STR(skbuff)" -c -o net/core/skbuff.o net/core/skbuff.c
      net/core/skbuff.c:648:1: directives may not be used inside a macro argument
      net/core/skbuff.c:647:39: unterminated argument list invoking macro "memcpy"
      net/core/skbuff.c: In function `pskb_expand_head':
      net/core/skbuff.c:651: `memcpy' undeclared (first use in this function)
      net/core/skbuff.c:651: (Each undeclared identifier is reported only once
      net/core/skbuff.c:651: for each function it appears in.)
      net/core/skbuff.c:651: syntax error before "skb"
      make[2]: *** [net/core/skbuff.o] Error 1
      make[1]: *** [net/core] Error 2
      make: *** [net] Error 2
      
      The patch below implements a simple workaround which is to
      clone the offending memcpy() call and specialise it for the
      two different scenarios.
      
      Other workarounds are of course possible: e.g. bind the varying
      parameter in a local variable, or use a macro or inline function
      to perform the varying computation.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6ccc67d
  8. 28 4月, 2007 1 次提交
  9. 26 4月, 2007 22 次提交
  10. 18 4月, 2007 1 次提交
  11. 30 3月, 2007 1 次提交
  12. 17 3月, 2007 1 次提交
  13. 01 3月, 2007 1 次提交
  14. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  15. 11 2月, 2007 1 次提交