1. 03 7月, 2006 1 次提交
  2. 23 6月, 2006 2 次提交
    • H
      [NET]: Merge TSO/UFO fields in sk_buff · 7967168c
      Herbert Xu 提交于
      Having separate fields in sk_buff for TSO/UFO (tso_size/ufo_size) is not
      going to scale if we add any more segmentation methods (e.g., DCCP).  So
      let's merge them.
      
      They were used to tell the protocol of a packet.  This function has been
      subsumed by the new gso_type field.  This is essentially a set of netdev
      feature bits (shifted by 16 bits) that are required to process a specific
      skb.  As such it's easy to tell whether a given device can process a GSO
      skb: you just have to and the gso_type field and the netdev's features
      field.
      
      I've made gso_type a conjunction.  The idea is that you have a base type
      (e.g., SKB_GSO_TCPV4) that can be modified further to support new features.
      For example, if we add a hardware TSO type that supports ECN, they would
      declare NETIF_F_TSO | NETIF_F_TSO_ECN.  All TSO packets with CWR set would
      have a gso_type of SKB_GSO_TCPV4 | SKB_GSO_TCPV4_ECN while all other TSO
      packets would be SKB_GSO_TCPV4.  This means that only the CWR packets need
      to be emulated in software.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7967168c
    • H
      [NET]: Avoid allocating skb in skb_pad · 5b057c6b
      Herbert Xu 提交于
      First of all it is unnecessary to allocate a new skb in skb_pad since
      the existing one is not shared.  More importantly, our hard_start_xmit
      interface does not allow a new skb to be allocated since that breaks
      requeueing.
      
      This patch uses pskb_expand_head to expand the existing skb and linearize
      it if needed.  Actually, someone should sift through every instance of
      skb_pad on a non-linear skb as they do not fit the reasons why this was
      originally created.
      
      Incidentally, this fixes a minor bug when the skb is cloned (tcpdump,
      TCP, etc.).  As it is skb_pad will simply write over a cloned skb.  Because
      of the position of the write it is unlikely to cause problems but still
      it's best if we don't do it.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b057c6b
  3. 27 5月, 2006 1 次提交
  4. 04 3月, 2006 1 次提交
  5. 24 2月, 2006 2 次提交
  6. 01 2月, 2006 1 次提交
  7. 29 1月, 2006 1 次提交
  8. 11 1月, 2006 1 次提交
  9. 17 11月, 2005 2 次提交
  10. 01 10月, 2005 1 次提交
  11. 22 9月, 2005 1 次提交
  12. 14 9月, 2005 1 次提交
  13. 27 8月, 2005 1 次提交
  14. 19 8月, 2005 1 次提交
  15. 29 6月, 2005 1 次提交
    • D
      [NET]: Remove gratuitous use of skb->tail in network drivers. · 689be439
      David S. Miller 提交于
      Many drivers use skb->tail unnecessarily.
      
      In these situations, the code roughly looks like:
      
      	dev = dev_alloc_skb(...);
      
      	[optional] skb_reserve(skb, ...);
      
      	... skb->tail ...
      
      But even if the skb_reserve() happens, skb->data equals
      skb->tail.  So it doesn't make any sense to use anything
      other than skb->data in these cases.
      
      Another case was the s2io.c driver directly mucking with
      the skb->data and skb->tail pointers.  It really just wanted
      to do an skb_reserve(), so that's what the code was changed
      to do instead.
      
      Another reason I'm making this change as it allows some SKB
      cleanups I have planned simpler to merge.  In those cleanups,
      skb->head, skb->tail, and skb->end pointers are removed, and
      replaced with skb->head_room and skb->tail_room integers.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NJeff Garzik <jgarzik@pobox.com>
      689be439
  16. 14 6月, 2005 1 次提交
  17. 28 5月, 2005 8 次提交
  18. 13 5月, 2005 1 次提交
    • F
      [PATCH] r8169: incoming frame length check · 126fa4b9
      Francois Romieu 提交于
        
        The size of the incoming frame is not correctly checked.
        
        The RxMaxSize register (0xDA) does not work as expected and incoming
        frames whose size exceeds the MTU actually end spanning multiple
        descriptors. The first Rx descriptor contains the size of the whole
        frame (or some garbage in its place). The driver does not expect
        something above the space allocated to the current skb and crashes
        loudly when it issues a skb_put.
        
        The fix contains two parts:
        - disable hardware Rx size filtering: so far it only proved to be able
          to trigger some new fancy errors;
        - drop multi-descriptors frame: as the driver allocates MTU sized Rx
          buffers, it provides an adequate filtering.
        
        As a bonus, wrong descriptors were not returned to the asic after their
        processing.
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      126fa4b9
  19. 01 5月, 2005 1 次提交
  20. 17 4月, 2005 2 次提交