1. 31 8月, 2015 1 次提交
  2. 29 8月, 2015 1 次提交
  3. 15 7月, 2015 4 次提交
  4. 16 6月, 2015 1 次提交
  5. 13 6月, 2015 5 次提交
  6. 02 6月, 2015 1 次提交
  7. 31 5月, 2015 2 次提交
  8. 21 5月, 2015 2 次提交
  9. 19 5月, 2015 1 次提交
  10. 13 5月, 2015 1 次提交
  11. 16 4月, 2015 2 次提交
  12. 03 4月, 2015 1 次提交
  13. 19 3月, 2015 1 次提交
  14. 17 2月, 2015 1 次提交
  15. 10 2月, 2015 2 次提交
    • Y
      IB/mlx4: Reset flow support for IB kernel ULPs · 35f05dab
      Yishai Hadas 提交于
      The driver exposes interfaces that directly relate to HW state. Upon fatal
      error, consumers of these interfaces (ULPs) that rely on completion of
      all their posted work-request could hang, thereby introducing dependencies
      in shutdown order.  To prevent this from happening, we manage the
      relevant resources (CQs, QPs) that are used by the device. Upon a fatal error,
      we now generate simulated completions for outstanding WQEs that were not
      completed at the time the HW was reset.
      
      It includes invoking the completion event handler for all involved CQs so that
      the ULPs will poll those CQs. When polled we return simulated CQEs with
      IB_WC_WR_FLUSH_ERR return code enabling ULPs to clean up their resources and
      not wait forever for completions upon receiving remove_one.
      
      The above change requires an extra check in the data path to make sure that when
      device is in error state, the simulated CQEs will be returned and no further
      WQEs will be posted.
      Signed-off-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      35f05dab
    • M
      IB/mlx4: Always use the correct port for mirrored multicast attachments · 824c25c1
      Moni Shoua 提交于
      When attaching a QP to a multicast address in bonded mode, there was an
      assumption that the port of the QP must be #1. This assumption isn't the
      case under the flow which enables maximal usage of the physical ports.
      
      Fix it by always checking the port of the original flow and create the
      mirrored flow on the other port.
      
      Fixes: c6215745 ('IB/mlx4: Load balance ports in port aggregation mode')
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      824c25c1
  16. 05 2月, 2015 3 次提交
  17. 26 1月, 2015 1 次提交
  18. 16 1月, 2015 1 次提交
  19. 12 12月, 2014 1 次提交
    • E
      net/mlx4: Change QP allocation scheme · ddae0349
      Eugenia Emantayev 提交于
      When using BF (Blue-Flame), the QPN overrides the VLAN, CV, and SV fields
      in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset.
      
      The current Ethernet driver code reserves a Tx QP range with 256b alignment.
      
      This is wrong because if there are more than 64 Tx QPs in use,
      QPNs >= base + 65 will have bits 6/7 set.
      
      This problem is not specific for the Ethernet driver, any entity that
      tries to reserve more than 64 BF-enabled QPs should fail. Also, using
      ranges is not necessary here and is wasteful.
      
      The new mechanism introduced here will support reservation for
      "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs
      (when hypervisors support WC in VMs). The flow we use is:
      
      1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation,
         and request "BF enabled QPs" if BF is supported for the function
      
      2. In the ALLOC_RES FW command, change param1 to:
      a. param1[23:0]  - number of QPs
      b. param1[31-24] - flags controlling QPs reservation
      
      Bit 31 refers to Eth blueflame supported QPs. Those QPs must have
      bits 6 and 7 unset in order to be used in Ethernet.
      
      Bits 24-30 of the flags are currently reserved.
      
      When a function tries to allocate a QP, it states the required attributes
      for this QP. Those attributes are considered "best-effort". If an attribute,
      such as Ethernet BF enabled QP, is a must-have attribute, the function has
      to check that attribute is supported before trying to do the allocation.
      
      In a lower layer of the code, mlx4_qp_reserve_range masks out the bits
      which are unsupported. If SRIOV is used, the PF validates those attributes
      and masks out unsupported attributes as well. In order to notify VFs which
      attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's
      mailbox is filled by the PF, which notifies which QP allocation attributes
      it supports.
      Signed-off-by: NEugenia Emantayev <eugenia@mellanox.co.il>
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ddae0349
  20. 14 11月, 2014 1 次提交
  21. 31 10月, 2014 1 次提交
    • O
      mlx4: Avoid leaking steering rules on flow creation error flow · 571e1b2c
      Or Gerlitz 提交于
      If mlx4_ib_create_flow() attempts to create > 1 rules with the
      firmware, and one of these registrations fail, we leaked the
      already created flow rules.
      
      One example of the leak is when the registration of the VXLAN ghost
      steering rule fails, we didn't unregister the original rule requested
      by the user, introduced in commit d2fce8a9 "mlx4: Set
      user-space raw Ethernet QPs to properly handle VXLAN traffic".
      
      While here, add dump of the VXLAN portion of steering rules
      so it can actually be seen when flow creation fails.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      571e1b2c
  22. 23 9月, 2014 6 次提交
    • J
      IB/mlx4: Fix VF mac handling in RoCE · 25476b02
      Jack Morgenstein 提交于
      We had several problems here.  First, a race condition on QP1 mac
      handling between mlx4_ib_update_qps and mlx4_ib_modify_qp, which is
      fixed by taking the qp mutex in mlx4_ib_update_qps.
      
      Also, qp->pri.smac_port was not updated in mlx4_ib_update_qps.
      
      Last, in __mlx4_ib_modify_qp we did not properly handle the case where
      the mac is zero, but port is non-zero.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      25476b02
    • J
      IB/mlx4: Do not allow APM under RoCE · 3dec4878
      Jack Morgenstein 提交于
      Automatic Path Migration is not supported under RoCE. Therefore,
      return a "not-supported" error if the caller attempts to set an
      alternate path in a QP context.
      
      In addition, if there are no IB ports configured, do not report
      APM capability in the device flags returned by mlx4_ib_query_device.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      3dec4878
    • J
      IB/mlx4: Don't update QP1 in native mode · d24d9f43
      Jack Morgenstein 提交于
      For native functions (non-SR-IOV), there's no reason to update
      the smac_index, as QP1 is a GSI QP.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      d24d9f43
    • J
      IB/mlx4: Avoid accessing netdevice when building RoCE qp1 header · 3e0629cb
      Jack Morgenstein 提交于
      The source MAC is needed in RoCE when building the QP1 header.
      
      Currently, this is obtained from the source net device. However, the net
      device may not yet exist, or can be destroyed in parallel to this QP1 send
      operation (e.g through the VPI port change flow) so accessing it may cause
      a kernel crash.
      
      To fix this, we maintain a source MAC cache per port for the net device in
      struct mlx4_ib_roce.  This cached MAC is initialized to be the default MAC
      address obtained during HCA initialization via QUERY_PORT. This cached MAC
      is updated via the netdev event notifier handler.
      
      Since the cached MAC is held in an atomic64 object, we do not need locking
      when accessing it.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      3e0629cb
    • M
      IB/mlx4: Avoid executing gid task when device is being removed · 4bf9715f
      Moni Shoua 提交于
      When device is being removed (e.g during VPI port link type change
      from ETH to IB), tasks for gid table changes should not be executed.
      
      Flush the current queue of tasks and block further tasks from entering the queue.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      4bf9715f
    • J
      IB/mlx4: Fix lockdep splat for the iboe lock · dba3ad2a
      Jack Morgenstein 提交于
      Chuck Lever reported the following stack trace:
      
          =================================
          [ INFO: inconsistent lock state ]
          3.16.0-rc2-00024-g2e78883 #17 Tainted: G            E
          ---------------------------------
          inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
          swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
          (&(&iboe->lock)->rlock){+.?...}, at: [<ffffffffa065f68b>] mlx4_ib_addr_event+0xdb/0x1a0 [mlx4_ib]
          {SOFTIRQ-ON-W} state was registered at:
           [<ffffffff810b3110>] mark_irqflags+0x110/0x170
           [<ffffffff810b4806>] __lock_acquire+0x2c6/0x5b0
           [<ffffffff810b4bd9>] lock_acquire+0xe9/0x120
           [<ffffffff815f7f6e>] _raw_spin_lock+0x3e/0x80
           [<ffffffffa0661084>] mlx4_ib_scan_netdevs+0x34/0x260 [mlx4_ib]
           [<ffffffffa06612db>] mlx4_ib_netdev_event+0x2b/0x40 [mlx4_ib]
           [<ffffffff81522219>] register_netdevice_notifier+0x99/0x1e0
           [<ffffffffa06626e3>] mlx4_ib_add+0x743/0xbc0 [mlx4_ib]
           [<ffffffffa05ec168>] mlx4_add_device+0x48/0xa0 [mlx4_core]
           [<ffffffffa05ec2c3>] mlx4_register_interface+0x73/0xb0 [mlx4_core]
           [<ffffffffa05c505e>] cm_req_handler+0x13e/0x460 [ib_cm]
           [<ffffffff810002e2>] do_one_initcall+0x112/0x1c0
           [<ffffffff810e8264>] do_init_module+0x34/0x190
           [<ffffffff810ea62f>] load_module+0x5cf/0x740
           [<ffffffff810ea939>] SyS_init_module+0x99/0xd0
           [<ffffffff815f8fd2>] system_call_fastpath+0x16/0x1b
          irq event stamp: 336142
          hardirqs last  enabled at (336142): [<ffffffff810612f5>] __local_bh_enable_ip+0xb5/0xc0
          hardirqs last disabled at (336141): [<ffffffff81061296>] __local_bh_enable_ip+0x56/0xc0
          softirqs last  enabled at (336004): [<ffffffff8106123a>] _local_bh_enable+0x4a/0x50
          softirqs last disabled at (336005): [<ffffffff810617a4>] irq_exit+0x44/0xd0
      
          other info that might help us debug this:
          Possible unsafe locking scenario:
      
                CPU0
                ----
           lock(&(&iboe->lock)->rlock);
           <Interrupt>
             lock(&(&iboe->lock)->rlock);
      
          *** DEADLOCK ***
      
      The above problem was caused by the spin lock being taken both in the process
      context and in a soft-irq context (in a netdev notifier handler).
      
      The required fix is to use spin_lock/unlock_bh() instead of spin_lock/unlock
      on the iboe lock.
      Reported-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      dba3ad2a