1. 04 Jan, 2016 3 commits
    • Michael Chan's avatar
      bnxt_en: Check for NULL rx or tx ring. · 3b2b7d9d
      Michael Chan authored
      
      
      Each bnxt_napi structure may no longer be having both an rx ring and
      a tx ring.  Check for a valid ring before using it.
      
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b2b7d9d
    • Michael Chan's avatar
      bnxt_en: Separate bnxt_{rx|tx}_ring_info structs from bnxt_napi struct. · b6ab4b01
      Michael Chan authored
      
      
      Currently, an rx and a tx ring are always paired with a completion ring.
      We want to restructure it so that it is possible to have a dedicated
      completion ring for tx or rx only.
      
      The bnxt hardware uses a completion ring for rx and tx events.  The driver
      has to process the completion ring entries sequentially for the rx and tx
      events.  Using a dedicated completion ring for rx only or tx only has these
      benefits:
      
      1. A burst of rx packets can cause delay in processing tx events if the
      completion ring is shared.  If tx queue is stopped by BQL, this can cause
      delay in re-starting the tx queue.
      
      2. A completion ring is sized according to the rx and tx ring size rounded
      up to the nearest power of 2.  When the completion ring is shared, it is
      sized by adding the rx and tx ring sizes and then rounded to the next power
      of 2, often with a lot of wasted space.
      
      3. Using dedicated completion ring, we can adjust the tx and rx coalescing
      parameters independently for rx and tx.
      
      The first step is to separate the rx and tx ring structures from the
      bnxt_napi struct.
      
      In this patch, an rx ring and a tx ring will point to the same bnxt_napi
      struct to share the same completion ring.  No change in ring assignment
      and mapping yet.
      
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6ab4b01
    • Michael Chan's avatar
      bnxt_en: Refactor bnxt_dbg_dump_states(). · 9f554590
      Michael Chan authored
      
      
      By adding 3 separate functions to dump the different ring states.
      
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f554590
  2. 28 Dec, 2015 10 commits
  3. 12 Dec, 2015 4 commits
  4. 03 Dec, 2015 3 commits
  5. 18 Nov, 2015 1 commit
    • Eric Dumazet's avatar
      net: provide generic busy polling to all NAPI drivers · 93d05d4a
      Eric Dumazet authored
      
      
      NAPI drivers no longer need to observe a particular protocol
      to benefit from busy polling (CONFIG_NET_RX_BUSY_POLL=y)
      
      napi_hash_add() and napi_hash_del() are automatically called
      from core networking stack, respectively from
      netif_napi_add() and netif_napi_del()
      
      This patch depends on free_netdev() and netif_napi_del() being
      called from process context, which seems to be the norm.
      
      Drivers might still prefer to call napi_hash_del() on their
      own, since they might combine all the rcu grace periods into
      a single one, knowing their NAPI structures lifetime, while
      core networking stack has no idea of a possible combining.
      
      Once this patch proves to not bring serious regressions,
      we will cleanup drivers to either remove napi_hash_del()
      or provide appropriate rcu grace periods combining.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93d05d4a
  6. 05 Nov, 2015 2 commits
  7. 26 Oct, 2015 1 commit
  8. 24 Oct, 2015 1 commit
  9. 23 Oct, 2015 1 commit
    • Michael Chan's avatar
      bnxt_en: New Broadcom ethernet driver. · c0c050c5
      Michael Chan authored
      
      
      Broadcom ethernet driver for the new family of NetXtreme-C/E
      ethernet devices.
      
      v5:
        - Removed empty blank lines at end of files (noted by David Miller).
        - Moved busy poll helper functions to bnxt.h to at least make the
          .c file look less cluttered with #ifdef (noted by Stephen Hemminger).
      
      v4:
        - Broke up 2 long message strings with "\n" (suggested by John Linville)
        - Constify an array of strings (suggested by Stephen Hemminger)
        - Improve bnxt_vf_pciid() (suggested by Stephen Hemminger)
        - Use PCI_VDEVICE() to populate pci_device_id table for more compact
          source.
      
      v3:
        - Fixed 2 more sparse warnings.
        - Removed some unused structures in .h files.
      
      v2:
        - Fixed all kbuild test robot reported warnings.
        - Fixed many of the checkpatch.pl errors and warnings.
        - Fixed the Kconfig description (noted by Dmitry Kravkov).
      
      Acked-by: default avatarEddie Wai <eddie.wai@broadcom.com>
      Acked-by: default avatarJeffrey Huang <huangjw@broadcom.com>
      Signed-off-by: default avatarPrashant Sreedharan <prashant@broadcom.com>
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0c050c5