net/bnxt: fix Tx queue profile selection
authorSomnath Kotur <somnath.kotur@broadcom.com>
Sat, 21 Dec 2019 02:29:37 +0000 (18:29 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:01 +0000 (19:46 +0100)
commit816eacad1116b06581df3ca6b269990d24f63dac
tree9f8d44546e63007d7382a1fefb9b5e0399e34f9f
parent074cacb9907aaae240a69eafc80018c873881d82
net/bnxt: fix Tx queue profile selection

In the case when CoS classification is disabled, driver was iterating
looking for only lossy profiles as that is what is expected to be used
for regular NIC operations. But in certain custom profiles, there were
no lossy profiles configured, only lossless profiles instead.
To handle such cases, it is better to fallback to using the first valid
profile.

Fixes: 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h