linux-hardened/include/linux/mlx4
Marcel Apfelbaum 3fc929e2d6 net/mlx4_core: Fix number of EQs used in ICM initialisation
In SRIOV mode, the number of EQs used when computing the total ICM size
was incorrect.

To fix this, we do the following:
1. We add a new structure to mlx4_dev, mlx4_phys_caps, to contain physical HCA
   capabilities.  The PPF uses the phys capabilities when it computes things
   like ICM size.

   The dev_caps structure will then contain the paravirtualized values, making
   bookkeeping much easier in SRIOV mode. We add a structure rather than a
   single parameter because there will be other fields in the phys_caps.

   The first field we add to the mlx4_phys_caps structure is num_phys_eqs.

2. In INIT_HCA, when running in SRIOV mode, the "log_num_eqs" parameter
   passed to the FW is the number of EQs per VF/PF; each function (PF or VF)
   has this number of EQs available.

   However, the total number of EQs which must be allowed for in the ICM is
   (1 << log_num_eqs) * (#VFs + #PFs).  Rather than compute this quantity,
   we allocate ICM space for 1024 EQs (which is the device maximum
   number of EQs, and which is the value we place in the mlx4_phys_caps structure).

   For INIT_HCA, however, we use the per-function number of EQs as described
   above.

Signed-off-by: Marcel Apfelbaum <marcela@dev.mellanox.co.il>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-31 18:18:16 -04:00
..
cmd.h net/mlx4_core: set port QoS attributes 2012-04-05 05:08:03 -04:00
cq.h mlx4_core: Add ethernet fields to CQE struct 2008-08-06 20:14:06 -07:00
device.h net/mlx4_core: Fix number of EQs used in ICM initialisation 2012-05-31 18:18:16 -04:00
doorbell.h mlx4_core: Kill mlx4_write64_raw() 2007-10-14 20:17:39 -07:00
driver.h device.h: audit and cleanup users in main include dir 2012-03-16 10:38:24 -04:00
qp.h InfiniBand/RDMA changes for the 3.5 merge window: 2012-05-21 17:54:55 -07:00
srq.h