1. 12 9月, 2016 1 次提交
  2. 24 6月, 2016 1 次提交
  3. 22 4月, 2016 1 次提交
  4. 03 3月, 2016 1 次提交
    • J
      net/mlx4_core: Fix lockdep warning in handling of mac/vlan tables · 03a79f31
      Jack Morgenstein 提交于
      In the mac and vlan register/unregister/replace functions, the driver locks
      the mac table mutex (or vlan table mutex) on both ports.
      
      We move to use mutex_lock_nested() to prevent warnings, such as the one below.
      
      [ 101.828445] =============================================
      [ 101.834820] [ INFO: possible recursive locking detected ]
      [ 101.841199] 4.5.0-rc2+  #49 Not tainted
      [ 101.850251] ---------------------------------------------
      [ 101.856621] modprobe/3054 is trying to acquire lock:
      [ 101.862514] (&table->mutex#2){+.+.+.}, at: [<ffffffffa079c10e>] __mlx4_register_mac+0x87e/0xa90 [mlx4_core]
      [ 101.874598]
      [ 101.874598] but task is already holding lock:
      [ 101.881703] (&table->mutex#2){+.+.+.}, at: [<ffffffffa079c0f0>] __mlx4_register_mac+0x860/0xa90 [mlx4_core]
      [ 101.893776]
      [ 101.893776] other info that might help us debug this:
      [ 101.901658] Possible unsafe locking scenario:
      [ 101.901658]
      [ 101.908859] CPU0
      [ 101.911923] ----
      [ 101.914985] lock(&table->mutex#2);
      [ 101.919595] lock(&table->mutex#2);
      [ 101.924199]
      [ 101.924199] * DEADLOCK *
      [ 101.924199]
      [ 101.931643] May be due to missing lock nesting notation
      
      Fixes: 5f61385d ('net/mlx4_core: Keep VLAN/MAC tables mirrored in multifunc HA mode')
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Suggested-by: NDoron Tsur <doront@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      03a79f31
  5. 20 1月, 2016 1 次提交
  6. 07 12月, 2015 1 次提交
  7. 03 4月, 2015 4 次提交
  8. 01 4月, 2015 3 次提交
  9. 26 1月, 2015 1 次提交
  10. 29 10月, 2014 1 次提交
  11. 23 9月, 2014 1 次提交
    • J
      mlx4: Fix mlx4 reg/unreg mac to work properly with 0-mac addresses · f4fd40b2
      Jack Morgenstein 提交于
      There is a chance that the VF mlx4 RoCE driver (mlx4_ib) may see a 0-mac
      as the current default MAC address when a RoCE interface first comes up.
      
      In this case, the RoCE driver registers the 0-mac to get its MAC index --
      used in the INIT2RTR transition when it creates its proxy Q1 qp's.
      
      If we do not allow QP1 to be created, the RoCE driver will not come up.
      If we do not register the 0-mac, but simply use a random mac-index,
      QP1 will attempt to send packets with an someone's else source MAC which
      will get the system into more troubled.
      
      Since a 0-mac was previously used to indicate a free slot, this leads to
      errors, both when the 0-mac is registered and when it is unregistered.
      
      The required fix is to check in addition that the slot containing the
      0-mac has a reference count of zero.
      
      Additionally, when comparing MAC addresses, need to mask out the 2 MSBs
      of the u64 mac on both sides of the comparison.
      
      Note that when the EN driver (mlx4_en) comes up, it set itself a proper
      mac --> the RoCE driver gets to be notified on that and further handing
      is done with the update qp command, as was added by commit 9433c188
      ("IB/mlx4: Invoke UPDATE_QP for proxy QP1 on MAC changes").
      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>
      f4fd40b2
  12. 09 7月, 2014 2 次提交
  13. 31 5月, 2014 1 次提交
  14. 09 5月, 2014 1 次提交
  15. 06 5月, 2014 1 次提交
  16. 29 3月, 2014 1 次提交
  17. 21 3月, 2014 1 次提交
    • M
      net/mlx4: Adapt code for N-Port VF · 449fc488
      Matan Barak 提交于
      Adds support for N-Port VFs, this includes:
      1. Adding support in the wrapped FW command
      	In wrapped commands, we need to verify and convert
      	the slave's port into the real physical port.
      	Furthermore, when sending the response back to the slave,
      	a reverse conversion should be made.
      2. Adjusting sqpn for QP1 para-virtualization
      	The slave assumes that sqpn is used for QP1 communication.
      	If the slave is assigned to a port != (first port), we need
      	to adjust the sqpn that will direct its QP1 packets into the
      	correct endpoint.
      3. Adjusting gid[5] to modify the port for raw ethernet
      	In B0 steering, gid[5] contains the port. It needs
      	to be adjusted into the physical port.
      4. Adjusting number of ports in the query / ports caps in the FW commands
      	When a slave queries the hardware, it needs to view only
      	the physical ports it's assigned to.
      5. Adjusting the sched_qp according to the port number
      	The QP port is encoded in the sched_qp, thus in modify_qp we need
      	to encode the correct port in sched_qp.
      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>
      449fc488
  18. 13 3月, 2014 3 次提交
  19. 19 1月, 2014 1 次提交
  20. 01 1月, 2014 1 次提交
  21. 08 11月, 2013 1 次提交
  22. 05 11月, 2013 3 次提交
  23. 27 4月, 2013 2 次提交
  24. 12 4月, 2013 1 次提交
  25. 08 3月, 2013 1 次提交
  26. 08 2月, 2013 1 次提交
  27. 01 10月, 2012 1 次提交
  28. 19 7月, 2012 1 次提交
  29. 12 7月, 2012 1 次提交
    • J
      mlx4: Put physical GID and P_Key table sizes in mlx4_phys_caps struct and paravirtualize them · 6634961c
      Jack Morgenstein 提交于
      To allow easy paravirtualization of P_Key and GID table sizes, keep
      paravirtualized sizes in mlx4_dev->caps, but save the actual physical
      sizes from FW in struct: mlx4_dev->phys_cap.
      
      In addition, in SR-IOV mode, do the following:
      
      1. Reduce reported P_Key table size by 1.
         This is done to reserve the highest P_Key index for internal use,
         for declaring an invalid P_Key in P_Key paravirtualization.
         We require a P_Key index which always contain an invalid P_Key
         value for this purpose (i.e., one which cannot be modified by
         the subnet manager).  The way to do this is to reduce the
         P_Key table size reported to the subnet manager by 1, so that
         it will not attempt to access the P_Key at index #127.
      
      2. Paravirtualize the GID table size to 1. Thus, each guest sees
         only a single GID (at its paravirtualized index 0).
      
      In addition, since we are paravirtualizing the GID table size to 1, we
      add paravirtualization of the master GID event here (i.e., we do not
      do ib_dispatch_event() for the GUID change event on the master, since
      its (only) GUID never changes).
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      6634961c