We get more than 64 MSI-X vectors from CX3 firmware 2.35.5530 onwards.
This results in in legacy mode EQ allocs after 64 EQs, which ends up
flooding 3 vectors and causing performance degradation.
With this patch, we limit max vector allocations MAX_MSIX(64).
When Mellanox driver can support more EQs without getting into legacy
mode, this patch should go away.
Orabug:
25912737
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs,
nreq);
+ /* 2.35.5530 firmware is providing more than 64 vectors.
+ * Limit max MSI-X vector allocation to MAX_MSIX(64) for now.
+ * Beyond that, it's going in legacy mode and 3 vectors are flooded with interrupts.
+ * This causes performance inconsistencies.
+ * We should remove following condition after driver can support beyond 64 vectors
+ * without getting into legacy mode.
+ */
+ if (nreq > MAX_MSIX)
+ nreq = MAX_MSIX;
if (msi_x > 1)
nreq = min_t(int, nreq, msi_x);