net/bnxt: fix VFR cleanup during init failure
authorSomnath Kotur <somnath.kotur@broadcom.com>
Fri, 11 Sep 2020 01:55:50 +0000 (18:55 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:11 +0000 (18:55 +0200)
commit843a67f77a0035168c48309804a39509480c59f8
tree98322e1324c15f2dddb946cc3cd378e00958578c
parent63cf825a17d47bdf736c2c81bbd8280f55d5f488
net/bnxt: fix VFR cleanup during init failure

If VF-rep port add fails for some reason, code was rolling back
all ports added so far. With some applications, there is no need
to do that. Just log failure message for the VF rep port add and
continue.
Also include RTE_MAX_ETH_PORTS value in the bounds check as one port
will be taken by the uplink port anyway

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c