1. 07 12月, 2015 1 次提交
  2. 16 11月, 2015 1 次提交
  3. 22 10月, 2015 1 次提交
  4. 09 10月, 2015 1 次提交
  5. 16 6月, 2015 3 次提交
  6. 31 5月, 2015 1 次提交
  7. 25 5月, 2015 2 次提交
  8. 15 5月, 2015 1 次提交
    • B
      net/mlx4: Avoid 'may be used uninitialized' warnings · c1c52db1
      Bjorn Helgaas 提交于
      With a cross-compiler based on gcc-4.9, I see warnings like the following:
      
        drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'mlx4_SW2HW_CQ_wrapper':
        drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3048:10: error: 'cq' may be used uninitialized in this function [-Werror=maybe-uninitialized]
          cq->mtt = mtt;
      
      I think the warning is spurious because we only use cq when
      cq_res_start_move_to() returns zero, and it always initializes *cq in that
      case.  The srq case is similar.  But maybe gcc isn't smart enough to figure
      that out.
      
      Initialize cq and srq explicitly to avoid the warnings.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1c52db1
  9. 06 5月, 2015 1 次提交
  10. 03 4月, 2015 2 次提交
  11. 25 3月, 2015 1 次提交
    • J
      net/mlx4_core: Fix GEN_EQE accessing uninitialixed mutex · bffb023a
      Jack Morgenstein 提交于
      We occasionally see in procedure mlx4_GEN_EQE that the driver tries
      to grab an uninitialized mutex.
      
      This can occur in only one of two ways:
      1. We are trying to generate an async event on an uninitialized slave.
      2. We are trying to generate an async event on an illegal slave number
         ( < 0 or > persist->num_vfs) or an inactive slave.
      
      To deal with #1: move the mutex initialization from specific slave init
      sequence in procedure mlx_master_do_cmd to mlx4_multi_func_init() (so that
      the mutex is always initialized for all slaves).
      
      To deal with #2: check in procedure mlx4_GEN_EQE that the slave number
      provided is in the proper range and that the slave is active.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bffb023a
  12. 19 3月, 2015 1 次提交
  13. 09 3月, 2015 1 次提交
  14. 03 3月, 2015 1 次提交
  15. 05 2月, 2015 2 次提交
    • M
      net/mlx4_core: Fix mpt_entry initialization in mlx4_mr_rereg_mem_write() · b332068c
      Maor Gottlieb 提交于
      a) Previously, mlx4_mr_rereg_write filled the MPT's start
         and length with the old MPT's values.
         Fixing the initialization to take the new start and length.
      
      b) In addition access flags in mpt_status were initialized instead of
         status due to bad boolean operation. Fixing the operation.
      
      c) Initialization of pd_slave caused a protection error.
         Fix - removing this initialization.
      
      d) In resource_tracker.c: Fixing vf encoding to be one-based.
      
      Fixes: e630664c ('mlx4_core: Add helper functions to support MR re-registration')
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b332068c
    • M
      net/mlx4_core: Port aggregation upper layer interface · 53f33ae2
      Moni Shoua 提交于
      Supply interface functions to bond and unbond ports of a mlx4 internal
      interfaces. Example for such an interface is the one registered by the
      mlx4 IB driver under RoCE.
      
      There are
      
      1. Functions to go in/out to/from bonded mode
      2. Function to remap virtual ports to physical ports
      
      The bond_mutex prevents simultaneous access to data that keep status of
      the device in bonded mode.
      
      The upper mlx4 interface marks to the mlx4 core module that they
      want to be subject for such bonding by setting the MLX4_INTFF_BONDING
      flag. Interface which goes to/from bonded mode is re-created.
      
      The mlx4 Ethernet driver does not set this flag when registering the
      interface, the IB driver does.
      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>
      53f33ae2
  16. 28 1月, 2015 1 次提交
  17. 26 1月, 2015 1 次提交
  18. 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
  19. 27 11月, 2014 1 次提交
  20. 04 11月, 2014 1 次提交
  21. 11 9月, 2014 3 次提交
  22. 02 8月, 2014 1 次提交
  23. 11 6月, 2014 1 次提交
    • J
      net/mlx4_core: Fix SRIOV free-pool management when enforcing resource quotas · 95646373
      Jack Morgenstein 提交于
      The Hypervisor driver tracks free slots and reserved slots at the global level
      and tracks allocated slots and guaranteed slots per VF.
      
      Guaranteed slots are treated as reserved by the driver, so the total
      reserved slots is the sum of all guaranteed slots over all the VFs.
      
      As VFs allocate resources, free (global) is decremented and allocated (per VF)
      is incremented for those resources. However, reserved (global) is never changed.
      
      This means that effectively, when a VF allocates a resource from its
      guaranteed pool, it is actually reducing that resource's free pool (since
      the global reserved count was not also reduced).
      
      The fix for this problem is the following: For each resource, as long as a
      VF's allocated count is <= its guaranteed number, when allocating for that
      VF, the reserved count (global) should be reduced by the allocation as well.
      
      When the global reserved count reaches zero, the remaining global free count
      is still accessible as the free pool for that resource.
      
      When the VF frees resources, the reverse happens: the global reserved count
      for a resource is incremented only once the VFs allocated number falls below
      its guaranteed number.
      
      This fix was developed by Rick Kready <kready@us.ibm.com>
      Reported-by: NRick Kready <kready@us.ibm.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95646373
  24. 03 6月, 2014 1 次提交
  25. 31 5月, 2014 2 次提交
  26. 30 5月, 2014 1 次提交
    • J
      mlx4: Add infrastructure for selecting VFs to enable QP0 via MLX proxy QPs · 99ec41d0
      Jack Morgenstein 提交于
      This commit adds the infrastructure for enabling selected VFs to
      operate SMI (QP0) MADs without restriction.
      
      Additionally, for these enabled VFs, their QP0 proxy and tunnel QPs
      are MLX QPs.  As such, they operate over VL15.  Therefore, they are
      not affected by "credit" problems or changes in the VLArb table (which
      may shut down VL0).
      
      Non-enabled VFs may only create UD proxy QP0 qps (which are forced by
      the hypervisor to send packets using the q-key it assigns and places
      in the qp-context).  Thus, non-enabled VFs will not pose a security
      risk.  The hypervisor discards any privileged MADs it receives from
      these non-enabled VFs.
      
      By default, all VFs are NOT enabled, and must explicitly be enabled
      by the administrator.
      
      The sysfs interface which operates the VF enablement infrastructure
      is provided in the next commit.
      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>
      99ec41d0
  27. 23 5月, 2014 1 次提交
  28. 17 5月, 2014 1 次提交
  29. 09 5月, 2014 1 次提交
  30. 06 5月, 2014 1 次提交
  31. 29 3月, 2014 1 次提交
  32. 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