net/bnxt: fix crash in VFR queue select
authorSomnath Kotur <somnath.kotur@broadcom.com>
Fri, 11 Sep 2020 01:55:49 +0000 (18:55 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:11 +0000 (18:55 +0200)
commit63cf825a17d47bdf736c2c81bbd8280f55d5f488
treed75035f9a04252ddcc74460cae932b3549da804a
parent64bc2dbb3fc8dc6619b31ccbe5805e3d086b23de
net/bnxt: fix crash in VFR queue select

Instead of bounds checking against max possible rings while selecting
queue index for the VF representor, do it against the number of rings
configured.

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>
drivers/net/bnxt/bnxt_reps.c