net/bnxt: fix tunnel port accounting
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 24 Sep 2021 19:52:47 +0000 (12:52 -0700)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 27 Sep 2021 20:23:25 +0000 (22:23 +0200)
commit3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3
tree546990b01598d3185407c23fd2dd86f3a601b9f0
parenta5d81111dc51d3bb7a96cd670e2186ce042e6c3e
net/bnxt: fix tunnel port accounting

Fix the tunnel port counting logic.
Currently we are incrementing the port count without checking
the if bnxt_hwrm_tunnel_dst_port_alloc would return success or failure.
Modify the logic to increment it only if the firmware returns success.

Fixes: 10d074b2022d ("net/bnxt: support tunneling")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c