1. 29 1月, 2008 2 次提交
  2. 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
  3. 11 11月, 2007 1 次提交
    • C
      [NET]: Fix skb_truesize_check() assertion · 78608ba0
      Chuck Lever 提交于
      The intent of the assertion in skb_truesize_check() is to check
      for skb->truesize being decremented too much by other code,
      resulting in a wraparound below zero.
      
      The type of the right side of the comparison causes the compiler to
      promote the left side to an unsigned type, despite the presence of an
      explicit type cast.  This defeats the check for negativity.
      
      Ensure both sides of the comparison are a signed type to prevent the
      implicit type conversion.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78608ba0
  4. 24 10月, 2007 1 次提交
  5. 22 10月, 2007 3 次提交
  6. 16 10月, 2007 2 次提交
  7. 17 9月, 2007 1 次提交
  8. 31 7月, 2007 1 次提交
  9. 16 7月, 2007 1 次提交
  10. 11 7月, 2007 4 次提交
    • H
      [NET]: Update comments for skb checksums · c6c6e3e0
      Herbert Xu 提交于
      Rusty (whose comments we should all study and emulate :) pointed
      out that our comments for skb checksums are no longer up-to-date.
      So here is a patch to
      
      1) add the case of partial checksums on input;
      2) update partial checksum case to mention csum_start/csum_offset;
      3) mention the new IPv6 feature bit.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6c6e3e0
    • 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
  11. 16 6月, 2007 1 次提交
  12. 03 5月, 2007 1 次提交
  13. 30 4月, 2007 1 次提交
  14. 26 4月, 2007 20 次提交