OSDN Git Service

bnxt_en: Fix RSS context allocation.
authorMichael Chan <michael.chan@broadcom.com>
Thu, 15 Nov 2018 08:25:37 +0000 (03:25 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2018 17:37:15 +0000 (09:37 -0800)
commit6ba990384e924476b5eed1734f3bcca0df6fd77e
tree5777c62bf1fa8eb7d87c2fceae0dc2b0b3a2b536
parentf8504f4ca0a0e9f84546ef86e00b24d2ea9a0bd2
bnxt_en: Fix RSS context allocation.

Recent commit has added the reservation of RSS context.  This requires
bnxt_hwrm_vnic_qcaps() to be called before allocating any RSS contexts.
The bnxt_hwrm_vnic_qcaps() call sets up proper flags that will
determine how many RSS contexts to allocate to support NTUPLE.

This causes a regression that too many RSS contexts are being reserved
and causing resource shortage when enabling many VFs.  Fix it by calling
bnxt_hwrm_vnic_qcaps() earlier.

Fixes: 41e8d7983752 ("bnxt_en: Modify the ring reservation functions for 57500 series chips.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c