1. 29 3月, 2008 1 次提交
  2. 28 3月, 2008 5 次提交
  3. 14 2月, 2008 1 次提交
  4. 13 2月, 2008 1 次提交
  5. 04 2月, 2008 1 次提交
  6. 29 1月, 2008 1 次提交
  7. 09 1月, 2008 1 次提交
    • P
      [NET]: Clone the sk_buff 'iif' field in __skb_clone() · 02f1c89d
      Paul Moore 提交于
      Both NetLabel and SELinux (other LSMs may grow to use it as well) rely
      on the 'iif' field to determine the receiving network interface of
      inbound packets.  Unfortunately, at present this field is not
      preserved across a skb clone operation which can lead to garbage
      values if the cloned skb is sent back through the network stack.  This
      patch corrects this problem by properly copying the 'iif' field in
      __skb_clone() and removing the 'iif' field assignment from
      skb_act_clone() since it is no longer needed.
      
      Also, while we are here, put the assignments in the same order as the
      offsets to reduce cacheline bounces.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02f1c89d
  8. 26 11月, 2007 1 次提交
    • H
      [SKBUFF]: Free old skb properly in skb_morph · 2d4baff8
      Herbert Xu 提交于
      The skb_morph function only freed the data part of the dst skb, but leaked
      the auxiliary data such as the netfilter fields.  This patch fixes this by
      moving the relevant parts from __kfree_skb to skb_release_all and calling
      it in skb_morph.
      
      It also makes kfree_skbmem static since it's no longer called anywhere else
      and it now no longer does skb_release_data.
      
      Thanks to Yasuyuki KOZAKAI for finding this problem and posting a patch for
      it.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      2d4baff8
  9. 02 11月, 2007 1 次提交
    • J
      [SG] Get rid of __sg_mark_end() · c46f2334
      Jens Axboe 提交于
      sg_mark_end() overwrites the page_link information, but all users want
      __sg_mark_end() behaviour where we just set the end bit. That is the most
      natural way to use the sg list, since you'll fill it in and then mark the
      end point.
      
      So change sg_mark_end() to only set the termination bit. Add a sg_magic
      debug check as well, and clear a chain pointer if it is set.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c46f2334
  10. 31 10月, 2007 1 次提交
    • D
      [NET]: Fix incorrect sg_mark_end() calls. · 51c739d1
      David S. Miller 提交于
      This fixes scatterlist corruptions added by
      
      	commit 68e3f5dd
      	[CRYPTO] users: Fix up scatterlist conversion errors
      
      The issue is that the code calls sg_mark_end() which clobbers the
      sg_page() pointer of the final scatterlist entry.
      
      The first part fo the fix makes skb_to_sgvec() do __sg_mark_end().
      
      After considering all skb_to_sgvec() call sites the most correct
      solution is to call __sg_mark_end() in skb_to_sgvec() since that is
      what all of the callers would end up doing anyways.
      
      I suspect this might have fixed some problems in virtio_net which is
      the sole non-crypto user of skb_to_sgvec().
      
      Other similar sg_mark_end() cases were converted over to
      __sg_mark_end() as well.
      
      Arguably sg_mark_end() is a poorly named function because it doesn't
      just "mark", it clears out the page pointer as a side effect, which is
      what led to these bugs in the first place.
      
      The one remaining plain sg_mark_end() call is in scsi_alloc_sgtable()
      and arguably it could be converted to __sg_mark_end() if only so that
      we can delete this confusing interface from linux/scatterlist.h
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51c739d1
  11. 26 10月, 2007 1 次提交
  12. 24 10月, 2007 1 次提交
  13. 23 10月, 2007 1 次提交
  14. 16 10月, 2007 3 次提交
  15. 11 10月, 2007 1 次提交
  16. 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
  17. 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
  18. 06 7月, 2007 1 次提交
  19. 24 6月, 2007 2 次提交
  20. 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
  21. 28 4月, 2007 1 次提交
  22. 26 4月, 2007 10 次提交