1. 19 8月, 2015 2 次提交
    • V
    • S
      igb: Fix oops caused by missing queue pairing · 72ddef05
      Shota Suzuki 提交于
      When initializing igb driver (e.g. 82576, I350), IGB_FLAG_QUEUE_PAIRS is
      set if adapter->rss_queues exceeds half of max_rss_queues in
      igb_init_queue_configuration().
      On the other hand, IGB_FLAG_QUEUE_PAIRS is not set even if the number of
      queues exceeds half of max_combined in igb_set_channels() when changing
      the number of queues by "ethtool -L".
      In this case, if numvecs is larger than MAX_MSIX_ENTRIES (10), the size
      of adapter->msix_entries[], an overflow can occur in
      igb_set_interrupt_capability(), which in turn leads to an oops.
      
      Fix this problem as follows:
       - When changing the number of queues by "ethtool -L", set
         IGB_FLAG_QUEUE_PAIRS in the same way as initializing igb driver.
       - When increasing the size of q_vector, reallocate it appropriately.
         (With IGB_FLAG_QUEUE_PAIRS set, the size of q_vector gets larger.)
      
      Another possible way to fix this problem is to cap the queues at its
      initial number, which is the number of the initial online cpus. But this
      is not the optimal way because we cannot increase queues when another
      cpu becomes online.
      
      Note that before commit cd14ef54 ("igb: Change to use statically
      allocated array for MSIx entries"), this problem did not cause oops
      but just made the number of queues become 1 because of entering msi_only
      mode in igb_set_interrupt_capability().
      
      Fixes: 907b7835 ("igb: Add ethtool support to configure number of channels")
      CC: stable <stable@vger.kernel.org>
      Signed-off-by: NShota Suzuki <suzuki_shota_t3@lab.ntt.co.jp>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      72ddef05
  2. 23 7月, 2015 1 次提交
  3. 18 7月, 2015 1 次提交
  4. 26 6月, 2015 1 次提交
  5. 12 5月, 2015 1 次提交
  6. 07 5月, 2015 2 次提交
  7. 04 5月, 2015 1 次提交
  8. 30 3月, 2015 1 次提交
  9. 21 3月, 2015 1 次提交
  10. 23 1月, 2015 5 次提交
  11. 14 1月, 2015 1 次提交
  12. 12 12月, 2014 1 次提交
    • A
      fm10k/igb/ixgbe: Use dma_rmb on Rx descriptor reads · 124b74c1
      Alexander Duyck 提交于
      This change makes it so that dma_rmb is used when reading the Rx
      descriptor.  The advantage of dma_rmb is that it allows for a much
      lower cost barrier on x86, powerpc, arm, and arm64 architectures than a
      traditional memory barrier when dealing with reads that only have to
      synchronize to coherent memory.
      
      In addition I have updated the code so that it just checks to see if any
      bits have been set instead of just the DD bit since the DD bit will always
      be set as a part of a descriptor write-back so we just need to check for a
      non-zero value being present at that memory location rather than just
      checking for any specific bit.  This allows the code itself to appear much
      cleaner and allows the compiler more room to optimize.
      
      Cc: Matthew Vick <matthew.vick@intel.com>
      Cc: Don Skidmore <donald.c.skidmore@intel.com>
      Acked-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      124b74c1
  13. 11 12月, 2014 1 次提交
  14. 09 12月, 2014 1 次提交
  15. 05 12月, 2014 1 次提交
  16. 24 11月, 2014 1 次提交
  17. 17 11月, 2014 1 次提交
  18. 12 11月, 2014 1 次提交
  19. 30 10月, 2014 1 次提交
    • R
      igb: don't reuse pages with pfmemalloc flag · bc16e47f
      Roman Gushchin 提交于
      Incoming packet is dropped silently by sk_filter(), if the skb was
      allocated from pfmemalloc reserves and the corresponding socket is
      not marked with the SOCK_MEMALLOC flag.
      
      Igb driver allocates pages for DMA with __skb_alloc_page(), which
      calls alloc_pages_node() with the __GFP_MEMALLOC flag. So, in case
      of OOM condition, igb can get pages with pfmemalloc flag set.
      
      If an incoming packet hits the pfmemalloc page and is large enough
      (small packets are copying into the memory, allocated with
      netdev_alloc_skb_ip_align(), so they are not affected), it will be
      dropped.
      
      This behavior is ok under high memory pressure, but the problem is
      that the igb driver reuses these mapped pages. So, packets are still
      dropping even if all memory issues are gone and there is a plenty
      of free memory.
      
      In my case, some TCP sessions hang on a small percentage (< 0.1%)
      of machines days after OOMs.
      
      Fix this by avoiding reuse of such pages.
      Signed-off-by: NRoman Gushchin <klamm@yandex-team.ru>
      Tested-by: Aaron Brown "aaron.f.brown@intel.com"
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      bc16e47f
  20. 11 10月, 2014 1 次提交
  21. 02 10月, 2014 3 次提交
  22. 06 9月, 2014 2 次提交
  23. 28 8月, 2014 1 次提交
  24. 26 8月, 2014 1 次提交
    • D
      net: Remove ndo_xmit_flush netdev operation, use signalling instead. · 0b725a2c
      David S. Miller 提交于
      As reported by Jesper Dangaard Brouer, for high packet rates the
      overhead of having another indirect call in the TX path is
      non-trivial.
      
      There is the indirect call itself, and then there is all of the
      reloading of the state to refetch the tail pointer value and
      then write the device register.
      
      Move to a more passive scheme, which requires very light modifications
      to the device drivers.
      
      The signal is a new skb->xmit_more value, if it is non-zero it means
      that more SKBs are pending to be transmitted on the same queue as the
      current SKB.  And therefore, the driver may elide the tail pointer
      update.
      
      Right now skb->xmit_more is always zero.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b725a2c
  25. 25 8月, 2014 1 次提交
  26. 24 7月, 2014 2 次提交
  27. 11 7月, 2014 1 次提交
  28. 10 7月, 2014 1 次提交
  29. 01 7月, 2014 1 次提交
  30. 11 6月, 2014 1 次提交