]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Improve VF resource accounting.
authorMichael Chan <mchan@broadcom.com>
Sun, 27 Dec 2015 23:19:26 +0000 (18:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Dec 2015 05:57:28 +0000 (00:57 -0500)
commitd2cbc1e498f1f5690ed8b2f9547449bac5c89b0f
treec6649b5ef3fbbf28ad320565bd7825d7042b27dc
parentea17ab61665cee0e2d2aa4e9c0545d382ff14be1
bnxt_en: Improve VF resource accounting.

We need to keep track of all resources, such as rx rings, tx rings,
cmpl rings, rss contexts, stats contexts, vnics, after we have
divided them for the VFs.  Otherwise, subsequent ring changes on
the PF may not work correctly.

We adjust all max resources in struct bnxt_pf_info after they have been
assigned to the VFs.  There is no need to keep the separate
max_pf_tx_rings and max_pf_rx_rings.

When SR-IOV is disabled, we call bnxt_hwrm_func_qcaps() to restore the
max resources for the PF.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c