1. 04 12月, 2012 1 次提交
  2. 28 9月, 2012 1 次提交
  3. 08 9月, 2012 1 次提交
  4. 17 7月, 2012 1 次提交
  5. 11 7月, 2012 1 次提交
  6. 05 7月, 2012 1 次提交
  7. 28 6月, 2012 2 次提交
  8. 17 6月, 2012 4 次提交
  9. 07 6月, 2012 1 次提交
    • J
      ethernet: Remove casts to same type · 64699336
      Joe Perches 提交于
      Adding casts of objects to the same type is unnecessary
      and confusing for a human reader.
      
      For example, this cast:
      
              int y;
              int *p = (int *)&y;
      
      I used the coccinelle script below to find and remove these
      unnecessary casts.  I manually removed the conversions this
      script produces of casts with __force, __iomem and __user.
      
      @@
      type T;
      T *p;
      @@
      
      -       (T *)p
      +       p
      
      A function in atl1e_main.c was passed a const pointer
      when it actually modified elements of the structure.
      
      Change the argument to a non-const pointer.
      
      A function in stmmac needed a __force to avoid a sparse
      warning.  Added it.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64699336
  10. 01 5月, 2012 1 次提交
    • 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
  11. 14 4月, 2012 1 次提交
  12. 07 4月, 2012 1 次提交
  13. 24 2月, 2012 1 次提交
  14. 06 2月, 2012 2 次提交
  15. 01 2月, 2012 1 次提交
  16. 20 12月, 2011 1 次提交
  17. 01 12月, 2011 1 次提交
  18. 24 11月, 2011 1 次提交
  19. 22 11月, 2011 1 次提交
  20. 18 11月, 2011 1 次提交
    • E
      bnx2: switch to build_skb() infrastructure · dd2bc8e9
      Eric Dumazet 提交于
      This is very similar to bnx2x conversion, but bnx2 only requires 16bytes
      alignement at start of the received frame to store its l2_fhdr, so goal
      was not to reduce skb truesize (in fact it should not change after this
      patch)
      
      Using build_skb() reduces cache line misses in the driver, since we
      use cache hot skb instead of cold ones. Number of in-flight sk_buff
      structures is lower, they are more likely recycled in SLUB caches
      while still hot.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Michael Chan <mchan@broadcom.com>
      CC: Eilon Greenstein <eilong@broadcom.com>
      Reviewed-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd2bc8e9
  21. 17 11月, 2011 2 次提交
  22. 09 11月, 2011 1 次提交
  23. 19 10月, 2011 1 次提交
  24. 14 10月, 2011 1 次提交
  25. 08 10月, 2011 1 次提交
  26. 07 10月, 2011 1 次提交
  27. 04 10月, 2011 1 次提交
  28. 27 8月, 2011 1 次提交
  29. 18 8月, 2011 1 次提交
  30. 11 8月, 2011 1 次提交
    • J
      broadcom: Move the Broadcom drivers · adfc5217
      Jeff Kirsher 提交于
      Moves the drivers for Broadcom devices into
      drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile
      changes.
      
      CC: Eilon Greenstein <eilong@broadcom.com>
      CC: Michael Chan <mchan@broadcom.com>
      CC: Matt Carlson <mcarlson@broadcom.com>
      CC: Gary Zambrano <zambrano@broadcom.com>
      CC: "Maciej W. Rozycki" <macro@linux-mips.org>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      adfc5217
  31. 22 7月, 2011 1 次提交
  32. 17 7月, 2011 1 次提交
    • M
      bnx2: Close device if tx_timeout reset fails · cd634019
      Michael Chan 提交于
      Based on original patch and description from Flavio Leitner <fbl@redhat.com>
      
      When bnx2_reset_task() is called, it will stop,
      (re)initialize and start the interface to restore
      the working condition.
      
      The bnx2_init_nic() calls bnx2_reset_nic() which will
      reset the chip and then calls bnx2_free_skbs() to free
      all the skbs.
      
      The problem happens when bnx2_init_chip() fails because
      bnx2_reset_nic() will just return skipping the ring
      initializations at bnx2_init_all_rings(). Later, the
      reset task starts the interface again and the system
      crashes due a NULL pointer access (no skb in the ring).
      
      To fix it, we call dev_close() if bnx2_init_nic() fails.
      One minor wrinkle to deal with is the cancel_work_sync()
      call in bnx2_close() to cancel bnx2_reset_task().  The
      call will wait forever because it is trying to cancel
      itself and the workqueue will be stuck.
      
      Since bnx2_reset_task() holds the rtnl_lock() and checks
      for netif_running() before proceeding, there is no need
      to cancel bnx2_reset_task() in bnx2_close() even if
      bnx2_close() and bnx2_reset_task() are running concurrently.
      The rtnl_lock() serializes the 2 calls.
      
      We need to move the cancel_work_sync() call to
      bnx2_remove_one() to make sure it is canceled before freeing
      the netdev struct.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
      Cc: Flavio Leitner <fbl@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd634019
  33. 14 7月, 2011 2 次提交