]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r318531:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 22 May 2017 08:19:08 +0000 (08:19 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 22 May 2017 08:19:08 +0000 (08:19 +0000)
commitac0d1c8c3ed5a6b368f18116adbf551b015c1b32
treea33d5732cb1e9c9edca4463e241ea454abc339e2
parent49dd88b59dd8b1a426807de3228359e285f0f454
MFC r318531:

mlx4: Use the CQ quota for SRIOV when creating completion EQs

When creating EQs to handle CQ completion events for the PF or for
VFs, we create enough EQE entries to handle completions for the max
number of CQs that can use that EQ.

When SRIOV is activated, the max number of CQs a VF (or the PF) can
obtain is its CQ quota (determined by the Hypervisor resource
tracker).  Therefore, when creating an EQ, the number of EQE entries
that the VF should request for that EQ is the CQ quota value (and not
the total number of CQs available in the firmware).

Under SRIOV, the PF, also must use its CQ quota, because the resource
tracker also controls how many CQs the PF can obtain.

Using the firmware total CQs instead of the CQ quota when creating EQs
resulted wasting MTT entries, due to allocating more EQEs than were
needed.

Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@318628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/ofed/drivers/net/mlx4/eq.c
sys/ofed/drivers/net/mlx4/main.c