1. 30 7月, 2012 4 次提交
  2. 17 7月, 2012 4 次提交
  3. 13 7月, 2012 1 次提交
  4. 05 7月, 2012 1 次提交
  5. 14 6月, 2012 1 次提交
  6. 12 6月, 2012 1 次提交
  7. 19 5月, 2012 1 次提交
  8. 01 5月, 2012 2 次提交
    • E
      tg3: provide frags as skb head · 8d4057a9
      Eric Dumazet 提交于
      This patch converts tg3 driver, one of our reference drivers, to use new
      build_skb() api in frag mode.
      
      Instead of using kmalloc() to allocate the memory block that will be
      used by build_skb() as skb->head, we use a page fragment.
      
      This is a followup of patch "net: allow skb->head to be a page fragment"
      
      This allows GRO, TCP coalescing, and splice() to be more efficient.
      
      Incidentally, this also removes SLUB slow path contention in kfree()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d4057a9
    • E
      net: allow skb->head to be a page fragment · d3836f21
      Eric Dumazet 提交于
      skb->head is currently allocated from kmalloc(). This is convenient but
      has the drawback the data cannot be converted to a page fragment if
      needed.
      
      We have three spots were it hurts :
      
      1) GRO aggregation
      
       When a linear skb must be appended to another skb, GRO uses the
      frag_list fallback, very inefficient since we keep all struct sk_buff
      around. So drivers enabling GRO but delivering linear skbs to network
      stack aren't enabling full GRO power.
      
      2) splice(socket -> pipe).
      
       We must copy the linear part to a page fragment.
       This kind of defeats splice() purpose (zero copy claim)
      
      3) TCP coalescing.
      
       Recently introduced, this permits to group several contiguous segments
      into a single skb. This shortens queue lengths and save kernel memory,
      and greatly reduce probabilities of TCP collapses. This coalescing
      doesnt work on linear skbs (or we would need to copy data, this would be
      too slow)
      
      Given all these issues, the following patch introduces the possibility
      of having skb->head be a fragment in itself. We use a new skb flag,
      skb->head_frag to carry this information.
      
      build_skb() is changed to accept a frag_size argument. Drivers willing
      to provide a page fragment instead of kmalloc() data will set a non zero
      value, set to the fragment size.
      
      Then, on situations we need to convert the skb head to a frag in itself,
      we can check if skb->head_frag is set and avoid the copies or various
      fallbacks we have.
      
      This means drivers currently using frags could be updated to avoid the
      current skb->head allocation and reduce their memory footprint (aka skb
      truesize). (thats 512 or 1024 bytes saved per skb). This also makes
      bpf/netfilter faster since the 'first frag' will be part of skb linear
      part, no need to copy data.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3836f21
  9. 30 4月, 2012 1 次提交
  10. 26 4月, 2012 1 次提交
  11. 04 4月, 2012 1 次提交
  12. 03 4月, 2012 1 次提交
  13. 29 3月, 2012 1 次提交
  14. 22 3月, 2012 1 次提交
    • M
      tg3: Fix RSS ring refill race condition · 7ae52890
      Michael Chan 提交于
      The RSS feature in tg3 hardware has only one rx producer ring for all
      RSS rings.  NAPI vector 1 is special and handles the refilling of the
      rx producer ring on behalf of all RSS rings.  There is a race condition
      between these RSS NAPIs and the NAPI[1].  If NAPI[1] finishes checking
      for refill and then another RSS ring empties the rx producer ring
      before NAPI[1] exits NAPI, the chip will be completely out of SKBs in
      the rx producer ring.
      
      We fix this by adding a flag tp->rx_refill and rely on napi_schedule()/
      napi_complete() to help synchronize it to close the race condition.
      
      Update driver version to 3.123.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ae52890
  15. 06 3月, 2012 1 次提交
  16. 05 3月, 2012 4 次提交
  17. 01 3月, 2012 1 次提交
    • M
      tg3: Fix tg3_get_stats64 for 5700 / 5701 devs · 65ec698d
      Matt Carlson 提交于
      tg3_get_stats64() takes tp->lock when dealing with non-serdes bcm5700
      and bcm5701 devices.  However, functions that call tg3_halt() have
      already acquired tp->lock.  When tg3_get_stats64() is called in
      tg3_halt(), deadlock will occur.
      
      This patch fixes the problem by separating the stat gathering code into
      a new tg3_get_nstats() function.  tg3_get_stats64() is recoded to call
      this function and take tp->lock.  The code that takes tp->lock in
      tg3_calc_crc_errors() has been removed.  Function signatures have been
      cleaned up too.
      Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      65ec698d
  18. 24 2月, 2012 1 次提交
  19. 23 2月, 2012 5 次提交
  20. 14 2月, 2012 7 次提交