1. 18 7月, 2017 2 次提交
  2. 08 6月, 2017 1 次提交
  3. 02 6月, 2017 1 次提交
    • J
      RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled · eed76245
      Jack Morgenstein 提交于
      The cited patch added a type field to structures ib_ah and rdma_ah_attr.
      
      Function mlx4_ib_query_ah() builds an rdma_ah_attr structure from the
      data in an mlx4_ib_ah structure (which contains both an ib_ah structure
      and an address vector).
      
      For mlx4_ib_query_ah() to work properly, the type field in the contained
      ib_ah structure must be set correctly.
      
      In the outgoing MAD tunneling flow, procedure mlx4_ib_multiplex_mad()
      paravirtualizes a MAD received from a slave and sends the processed
      mad out over the wire. During this processing, it populates an
      mlx4_ib_ah structure and calls mlx4_ib_query_ah().
      
      The cited commit overlooked setting the type field in the contained
      ib_ah structure before invoking mlx4_ib_query_ah(). As a result, the
      type field remained uninitialized, and the rdma_ah_attr structure was
      incorrectly built. This resulted in improperly built MADs being sent out
      over the wire.
      
      This patch properly initializes the type field in the contained ib_ah
      structure before calling mlx4_ib_query_ah(). The rdma_ah_attr structure
      is then generated correctly.
      
      Fixes: 44c58487 ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      eed76245
  4. 02 5月, 2017 9 次提交
  5. 26 4月, 2017 1 次提交
  6. 22 4月, 2017 5 次提交
    • M
      IB/mlx4: Change vma from shared to private · ca37a664
      Maor Gottlieb 提交于
      Anonymous VMA (->vm_ops == NULL) cannot be shared, otherwise
      it would lead to SIGBUS.
      
      Remove the shared flags from the vma after we change it to be
      anonymous.
      
      This is easily reproduced by doing modprobe -r while running a
      user-space application such as raw_ethernet_bw.
      
      Fixes: ae184dde ('IB/mlx4_ib: Disassociate support')
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      ca37a664
    • M
      IB/mlx4: Take write semaphore when changing the vma struct · 22c3653d
      Maor Gottlieb 提交于
      When the driver disassociate user context, it changes the vma to
      anonymous by setting the vm_ops to null and zap the vma ptes.
      
      In order to avoid race in the kernel, we need to take write lock
      before we change the vma entries.
      
      Fixes: ae184dde ('IB/mlx4_ib: Disassociate support')
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      22c3653d
    • J
      IB/mlx4: Reduce SRIOV multicast cleanup warning message to debug level · fb7a9174
      Jack Morgenstein 提交于
      A warning message during SRIOV multicast cleanup should have actually been
      a debug level message. The condition generating the warning does no harm
      and can fill the message log.
      
      In some cases, during testing, some tests were so intense as to swamp the
      message log with these warning messages, causing a stall in the console
      message log output task. This stall caused an NMI to be sent to all CPUs
      (so that they all dumped their stacks into the message log).
      Aside from the message flood causing an NMI, the tests all passed.
      
      Once the message flood which caused the NMI is removed (by reducing the
      warning message to debug level), the NMI no longer occurs.
      
      Sample message log (console log) output illustrating the flood and
      resultant NMI (snippets with comments and modified with ... instead
      of hex digits, to satisfy checkpatch.pl):
      
       <mlx4_ib> _mlx4_ib_mcg_port_cleanup: ... WARNING: group refcount 1!!!...
       *** About 4000 almost identical lines in less than one second ***
       <mlx4_ib> _mlx4_ib_mcg_port_cleanup: ... WARNING: group refcount 1!!!...
       INFO: rcu_sched detected stalls on CPUs/tasks: { 17} (...)
       *** { 17} above indicates that CPU 17 was the one that stalled ***
       sending NMI to all CPUs:
       ...
       NMI backtrace for cpu 17
       CPU: 17 PID: 45909 Comm: kworker/17:2
       Hardware name: HP ProLiant DL360p Gen8, BIOS P71 09/08/2013
       Workqueue: events fb_flashcursor
       task: ffff880478...... ti: ffff88064e...... task.ti: ffff88064e......
       RIP: 0010:[ffffffff81......]  [ffffffff81......] io_serial_in+0x15/0x20
       RSP: 0018:ffff88064e257cb0  EFLAGS: 00000002
       RAX: 0000000000...... RBX: ffffffff81...... RCX: 0000000000......
       RDX: 0000000000...... RSI: 0000000000...... RDI: ffffffff81......
       RBP: ffff88064e...... R08: ffffffff81...... R09: 0000000000......
       R10: 0000000000...... R11: ffff88064e...... R12: 0000000000......
       R13: 0000000000...... R14: ffffffff81...... R15: 0000000000......
       FS:  0000000000......(0000) GS:ffff8804af......(0000) knlGS:000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080......
       CR2: 00007f2a2f...... CR3: 0000000001...... CR4: 0000000000......
       DR0: 0000000000...... DR1: 0000000000...... DR2: 0000000000......
       DR3: 0000000000...... DR6: 00000000ff...... DR7: 0000000000......
       Stack:
       ffff88064e...... ffffffff81...... ffffffff81...... 0000000000......
       ffffffff81...... ffff88064e...... ffffffff81...... ffffffff81......
       ffffffff81...... ffff88064e...... ffffffff81...... 0000000000......
       Call Trace:
      [<ffffffff813d099b>] wait_for_xmitr+0x3b/0xa0
      [<ffffffff813d0b5c>] serial8250_console_putchar+0x1c/0x30
      [<ffffffff813d0b40>] ? serial8250_console_write+0x140/0x140
      [<ffffffff813cb5fa>] uart_console_write+0x3a/0x80
      [<ffffffff813d0aae>] serial8250_console_write+0xae/0x140
      [<ffffffff8107c4d1>] call_console_drivers.constprop.15+0x91/0xf0
      [<ffffffff8107d6cf>] console_unlock+0x3bf/0x400
      [<ffffffff813503cd>] fb_flashcursor+0x5d/0x140
      [<ffffffff81355c30>] ? bit_clear+0x120/0x120
      [<ffffffff8109d5fb>] process_one_work+0x17b/0x470
      [<ffffffff8109e3cb>] worker_thread+0x11b/0x400
      [<ffffffff8109e2b0>] ? rescuer_thread+0x400/0x400
      [<ffffffff810a5aef>] kthread+0xcf/0xe0
      [<ffffffff810a5a20>] ? kthread_create_on_node+0x140/0x140
      [<ffffffff81645858>] ret_from_fork+0x58/0x90
      [<ffffffff810a5a20>] ? kthread_create_on_node+0x140/0x140
      Code: 48 89 e5 d3 e6 48 63 f6 48 03 77 10 8b 06 5d c3 66 0f 1f 44 00 00 66 66 66 6
      
      As indicated in the stack trace above, the console output task got swamped.
      
      Fixes: b9c5d6a6 ("IB/mlx4: Add multicast group (MCG) paravirtualization for SR-IOV")
      Cc: <stable@vger.kernel.org> # v3.6+
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      fb7a9174
    • J
      IB/mlx4: Fix ib device initialization error flow · 99e68909
      Jack Morgenstein 提交于
      In mlx4_ib_add, procedure mlx4_ib_alloc_eqs is called to allocate EQs.
      
      However, in the mlx4_ib_add error flow, procedure mlx4_ib_free_eqs is not
      called to free the allocated EQs.
      
      Fixes: e605b743 ("IB/mlx4: Increase the number of vectors (EQs) available for ULPs")
      Cc: <stable@vger.kernel.org> # v3.4+
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      99e68909
    • M
      IB/mlx4: Support RAW Ethernet when RoCE is disabled · dd77abf8
      Majd Dibbiny 提交于
      On some environments, such as certain SR-IOV VF configurations, RoCE
      isn't supported for mlx4 Ethernet ports. Currently the driver will
      not open IB device on that port.
      
      This is problematic since we do want user-space RAW Ethernet QPs functionality
      to remain in place. For that end, enhance the relevant driver flows such that we
      do create a device instance in that case.
      Signed-off-by: NMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      dd77abf8
  7. 02 3月, 2017 2 次提交
  8. 15 2月, 2017 4 次提交
  9. 25 1月, 2017 1 次提交
  10. 11 1月, 2017 1 次提交
  11. 30 12月, 2016 1 次提交
    • J
      net/mlx4_core: Fix raw qp flow steering rules under SRIOV · 10b1c04e
      Jack Morgenstein 提交于
      Demoting simple flow steering rule priority (for DPDK) was achieved by
      wrapping FW commands MLX4_QP_FLOW_STEERING_ATTACH/DETACH for the PF
      as well, and forcing the priority to MLX4_DOMAIN_NIC in the wrapper
      function for the PF and all VFs.
      
      In function mlx4_ib_create_flow(), this change caused the main rule
      creation for the PF to be wrapped, while it left the associated
      tunnel steering rule creation unwrapped for the PF.
      
      This mismatch caused rule deletion failures in mlx4_ib_destroy_flow()
      for the PF when the detach wrapper function did not find the associated
      tunnel-steering rule (since creation of that rule for the PF did not
      go through the wrapper function).
      
      Fix this by setting MLX4_QP_FLOW_STEERING_ATTACH/DETACH to be "native"
      (so that the PF invocation does not go through the wrapper), and perform
      the required priority demotion for the PF in the mlx4_ib_create_flow()
      code path.
      
      Fixes: 48564135 ("net/mlx4_core: Demote simple multicast and broadcast flow steering rules")
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10b1c04e
  12. 15 12月, 2016 2 次提交
  13. 14 12月, 2016 4 次提交
  14. 04 12月, 2016 1 次提交
  15. 17 11月, 2016 5 次提交