1. 21 4月, 2016 1 次提交
  2. 06 4月, 2016 5 次提交
    • J
      fm10k: use ethtool_rxfh_indir_default for default redirection table · 0ea7fae4
      Jacob Keller 提交于
      The fm10k driver used its own code for generating a default indirection
      table on device load, which was not the same as the default generated by
      ethtool when indir_size of 0 is passed to SRXFH. Take advantage of
      ethtool_rxfh_indir_default() and simplify code to write the redirection
      table to reduce some code duplication.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      0ea7fae4
    • J
      fm10k: correctly clean up when init_queueing_scheme fails · 4be37c42
      Jacob Keller 提交于
      Fix a kernel panic that occurs during surprise removal. Clear the
      interface queue counts upon fm10k_init_msix_capability failure. This
      prevents further code (fm10k_update_stats etc.) from attempting to
      access unallocated queue vector or ring memory.
      
      [  628.692648] BUG: unable to handle kernel NULL pointer dereference at 0000000000000068
      [  628.692805] IP: [<ffffffffa0475caf>] fm10k_update_stats+0x7f/0x2c0 [fm10k]
      [  628.693173] PGD 0
      [  628.693759] Oops: 0000 [#1] SMP
      [  628.699321] CPU: 10 PID: 8164 Comm: kworker/10:0 Tainted: G           OE  ------------   3.10.0-327.el7.x86_64 #1
      [  628.700096] Hardware name: Supermicro X9DAi/X9DAi, BIOS 3.2 05/09/2015
      [  628.700894] Workqueue: pciehp-1 pciehp_power_thread
      [  628.701686] task: ffff88086559c500 ti: ffff8808593c0000 task.ti: ffff8808593c0000
      [  628.702493] RIP: 0010:[<ffffffffa0475caf>]  [<ffffffffa0475caf>] fm10k_update_stats+0x7f/0x2c0 [fm10k]
      [  628.703310] RSP: 0018:ffff8808593c3b00  EFLAGS: 00010282
      [  628.704132] RAX: 0000000000000000 RBX: ffff880860760000 RCX: 0000000000000000
      [  628.704963] RDX: ffff880860760b08 RSI: 0000000000000000 RDI: 0000000000000000
      [  628.705794] RBP: ffff8808593c3b40 R08: 0000000000000000 R09: 0000000000000000
      [  628.706604] R10: 0000000000000000 R11: ffff880860760c40 R12: 0000000000000080
      [  628.707420] R13: ffff8808607608c0 R14: ffff880860779ec0 R15: ffff880860779f40
      [  628.708238] FS:  0000000000000000(0000) GS:ffff88086f000000(0000) knlGS:0000000000000000
      [  628.709071] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  628.709923] CR2: 0000000000000068 CR3: 000000000194a000 CR4: 00000000001407e0
      [  628.710752] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  628.711596] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [  628.712438] Stack:
      [  628.713255]  ffff880860764458 ffff8808607608c0 ffff880860760000 ffff880860760000
      [  628.714088]  0000000000000080 ffff8808607608c0 ffff880860779ec0 ffff880860779f40
      [  628.714925]  ffff8808593c3b88 ffffffffa04780c5 ffff880860764458 0000000a8163cb5b
      [  628.715752] Call Trace:
      [  628.716560]  [<ffffffffa04780c5>] fm10k_down+0x155/0x1f0 [fm10k]
      [  628.717367]  [<ffffffffa0479958>] fm10k_close+0x28/0xd0 [fm10k]
      [  628.718184]  [<ffffffff81526365>] __dev_close_many+0x85/0xd0
      [  628.718986]  [<ffffffff815264d8>] dev_close_many+0x98/0x120
      [  628.719764]  [<ffffffff81527ab8>] rollback_registered_many+0xa8/0x230
      [  628.720527]  [<ffffffff81527c80>] rollback_registered+0x40/0x70
      [  628.721294]  [<ffffffff81529198>] unregister_netdevice_queue+0x48/0x80
      [  628.722052]  [<ffffffff815291ec>] unregister_netdev+0x1c/0x30
      [  628.722816]  [<ffffffffa04762b8>] fm10k_remove+0xd8/0xe0 [fm10k]
      [  628.723581]  [<ffffffff81328c7b>] pci_device_remove+0x3b/0xb0
      [  628.724340]  [<ffffffff813f5fbf>] __device_release_driver+0x7f/0xf0
      [  628.725088]  [<ffffffff813f6053>] device_release_driver+0x23/0x30
      [  628.725814]  [<ffffffff81321fe4>] pci_stop_bus_device+0x94/0xa0
      [  628.726535]  [<ffffffff813220d2>] pci_stop_and_remove_bus_device+0x12/0x20
      [  628.727249]  [<ffffffff8133de40>] pciehp_unconfigure_device+0xb0/0x1b0
      [  628.727964]  [<ffffffff8133d822>] pciehp_disable_slot+0x52/0xd0
      [  628.728664]  [<ffffffff8133d98a>] pciehp_power_thread+0xea/0x150
      [  628.729358]  [<ffffffff8109d5fb>] process_one_work+0x17b/0x470
      [  628.730036]  [<ffffffff8109e3cb>] worker_thread+0x11b/0x400
      [  628.730730]  [<ffffffff8109e2b0>] ? rescuer_thread+0x400/0x400
      [  628.731385]  [<ffffffff810a5aef>] kthread+0xcf/0xe0
      [  628.732036]  [<ffffffff810a5a20>] ? kthread_create_on_node+0x140/0x140
      [  628.732674]  [<ffffffff81645858>] ret_from_fork+0x58/0x90
      [  628.733289]  [<ffffffff810a5a20>] ? kthread_create_on_node+0x140/0x140
      [  628.733883] Code: 83 e8 01 48 8d 97 40 02 00 00 45 31 c0 4c 8d 9c c7 48 02 0
      [  628.735202] RIP  [<ffffffffa0475caf>] fm10k_update_stats+0x7f/0x2c0 [fm10k]
      [  628.735732]  RSP <ffff8808593c3b00>
      [  628.736285] CR2: 0000000000000068
      [  628.736846] ---[ end trace 9156088b311aff42 ]---
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4be37c42
    • J
      fm10k: base queue scheme covered by RSS · b3525696
      Jacob Keller 提交于
      In fm10k_set_num_queues, we previously assigned the base template. This
      would always be overwritten by either fm10k_set_qos_queues or
      fm10k_set_rss_queues. In either case, we don't need the base values, so
      we can just remove them.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      b3525696
    • B
      fm10k: cleanup remaining right-bit-shifted 1 · fcdb0a99
      Bruce Allan 提交于
      Use BIT() macro instead.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      fcdb0a99
    • B
      fm10k: Move constants to the right of binary operators · 1aab144c
      Bruce Allan 提交于
      The semantic patch that makes this change is available
      in scripts/coccinelle/misc/compare_const_fl.cocci.
      
      More information about semantic patching is available at
      http://coccinelle.lip6.fr/Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1aab144c
  3. 18 3月, 2016 1 次提交
    • J
      mm: introduce page reference manipulation functions · fe896d18
      Joonsoo Kim 提交于
      The success of CMA allocation largely depends on the success of
      migration and key factor of it is page reference count.  Until now, page
      reference is manipulated by direct calling atomic functions so we cannot
      follow up who and where manipulate it.  Then, it is hard to find actual
      reason of CMA allocation failure.  CMA allocation should be guaranteed
      to succeed so finding offending place is really important.
      
      In this patch, call sites where page reference is manipulated are
      converted to introduced wrapper function.  This is preparation step to
      add tracepoint to each page reference manipulation function.  With this
      facility, we can easily find reason of CMA allocation failure.  There is
      no functional change in this patch.
      
      In addition, this patch also converts reference read sites.  It will
      help a second step that renames page._count to something else and
      prevents later attempt to direct access to it (Suggested by Andrew).
      Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Acked-by: NVlastimil Babka <vbabka@suse.cz>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fe896d18
  4. 17 2月, 2016 1 次提交
  5. 22 12月, 2015 1 次提交
  6. 14 12月, 2015 3 次提交
  7. 06 12月, 2015 3 次提交
  8. 24 11月, 2015 1 次提交
  9. 16 10月, 2015 1 次提交
    • J
      drivers/net/intel: use napi_complete_done() · 32b3e08f
      Jesse Brandeburg 提交于
      As per Eric Dumazet's previous patches:
      (see commit (24d2e4a5) - tg3: use napi_complete_done())
      
      Quoting verbatim:
      Using napi_complete_done() instead of napi_complete() allows
      us to use /sys/class/net/ethX/gro_flush_timeout
      
      GRO layer can aggregate more packets if the flush is delayed a bit,
      without having to set too big coalescing parameters that impact
      latencies.
      </end quote>
      
      Tested
      configuration: low latency via ethtool -C ethx adaptive-rx off
      				rx-usecs 10 adaptive-tx off tx-usecs 15
      workload: streaming rx using netperf TCP_MAERTS
      
      igb:
      MIGRATED TCP MAERTS TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET : demo
      ...
      Interim result:  941.48 10^6bits/s over 1.000 seconds ending at 1440193171.589
      
      Alignment      Offset         Bytes    Bytes       Recvs   Bytes    Sends
      Local  Remote  Local  Remote  Xfered   Per                 Per
      Recv   Send    Recv   Send             Recv (avg)          Send (avg)
          8       8      0       0 1176930056  1475.36    797726   16384.00  71905
      
      MIGRATED TCP MAERTS TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET : demo
      ...
      Interim result:  941.49 10^6bits/s over 0.997 seconds ending at 1440193142.763
      
      Alignment      Offset         Bytes    Bytes       Recvs   Bytes    Sends
      Local  Remote  Local  Remote  Xfered   Per                 Per
      Recv   Send    Recv   Send             Recv (avg)          Send (avg)
          8       8      0       0 1175182320  50476.00     23282   16384.00  71816
      
      i40e:
      Hard to test because the traffic is incoming so fast (24Gb/s) that GRO
      always receives 87kB, even at the highest interrupt rate.
      
      Other drivers were only compile tested.
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      32b3e08f
  10. 14 10月, 2015 1 次提交
  11. 23 9月, 2015 1 次提交
  12. 16 9月, 2015 2 次提交
  13. 22 8月, 2015 1 次提交
    • M
      mm: make page pfmemalloc check more robust · 2f064f34
      Michal Hocko 提交于
      Commit c48a11c7 ("netvm: propagate page->pfmemalloc to skb") added
      checks for page->pfmemalloc to __skb_fill_page_desc():
      
              if (page->pfmemalloc && !page->mapping)
                      skb->pfmemalloc = true;
      
      It assumes page->mapping == NULL implies that page->pfmemalloc can be
      trusted.  However, __delete_from_page_cache() can set set page->mapping
      to NULL and leave page->index value alone.  Due to being in union, a
      non-zero page->index will be interpreted as true page->pfmemalloc.
      
      So the assumption is invalid if the networking code can see such a page.
      And it seems it can.  We have encountered this with a NFS over loopback
      setup when such a page is attached to a new skbuf.  There is no copying
      going on in this case so the page confuses __skb_fill_page_desc which
      interprets the index as pfmemalloc flag and the network stack drops
      packets that have been allocated using the reserves unless they are to
      be queued on sockets handling the swapping which is the case here and
      that leads to hangs when the nfs client waits for a response from the
      server which has been dropped and thus never arrive.
      
      The struct page is already heavily packed so rather than finding another
      hole to put it in, let's do a trick instead.  We can reuse the index
      again but define it to an impossible value (-1UL).  This is the page
      index so it should never see the value that large.  Replace all direct
      users of page->pfmemalloc by page_is_pfmemalloc which will hide this
      nastiness from unspoiled eyes.
      
      The information will get lost if somebody wants to use page->index
      obviously but that was the case before and the original code expected
      that the information should be persisted somewhere else if that is
      really needed (e.g.  what SLAB and SLUB do).
      
      [akpm@linux-foundation.org: fix blooper in slub]
      Fixes: c48a11c7 ("netvm: propagate page->pfmemalloc to skb")
      Signed-off-by: NMichal Hocko <mhocko@suse.com>
      Debugged-by: NVlastimil Babka <vbabka@suse.com>
      Debugged-by: NJiri Bohac <jbohac@suse.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Cc: <stable@vger.kernel.org>	[3.6+]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f064f34
  14. 18 6月, 2015 1 次提交
  15. 04 5月, 2015 1 次提交
  16. 15 4月, 2015 4 次提交
  17. 03 3月, 2015 3 次提交
  18. 23 1月, 2015 2 次提交
  19. 14 1月, 2015 1 次提交
  20. 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
  21. 11 12月, 2014 1 次提交
  22. 09 12月, 2014 1 次提交
  23. 12 11月, 2014 1 次提交
  24. 15 10月, 2014 1 次提交
  25. 11 10月, 2014 1 次提交