net/bnxt: fix flow creation with non-consecutive group ids
authorRahul Gupta <rahul.gupta@broadcom.com>
Wed, 13 Nov 2019 08:29:42 +0000 (13:59 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
commitfcdd7210aa1f211b5ab1c45c59bf23be6da27073
tree0afb8e1d059b4978d31e65e295d0883f5be31cf8
parentf03e66cb64cee0e9b4351a7ac42f467e69d966f2
net/bnxt: fix flow creation with non-consecutive group ids

In non-RSS mode, vnics map 1:1 with Rx queues during init. This can
create problems if non-consecutive group IDs are given as part of
subsequent flow create cmds as they can end up pointing to Rx queues
(mapped during init) that are different than the intended destination
queue as specified in the flow create cmd.
To fix this, now that we have the ability to dynamically create
vnics, do not create any additional vnics other than the default vnic
during init. Allocate them only during flow/filter creation time.

When RSS is disabled we need to use the COS queue count queried
from firmware.

Fixes: 36024b2e7fe5 ("net/bnxt: allow dynamic creation of VNIC")

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_flow.c
drivers/net/bnxt/bnxt_rxq.c