net/bnxt: fix dynamic VNIC count
authorLance Richardson <lance.richardson@broadcom.com>
Wed, 28 Apr 2021 22:03:44 +0000 (18:03 -0400)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Sun, 2 May 2021 22:15:57 +0000 (00:15 +0200)
commita0c2315a2a5f0a83d5d77ec745ac1de04a1e962b
tree3ba4e60e0f75f54a787a0a6537e0587ebc24c6fb
parentf8120fd07bf0ebdbcfa7e1a46c91df9d611ca940
net/bnxt: fix dynamic VNIC count

Ensure that the current count of in-use VNICs is decremented
when a VNIC is freed. Don't attempt VNIC allocation when the
maximum supported number of VNICs is currently allocated.

Fixes: 49d0709b257f ("net/bnxt: delete and flush L2 filters cleanly")
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reported-by: Stephen Hemminger <sthemmin@microsoft.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_flow.c