]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: init RSS table for Minimal-Static VF reservation
authorEdwin Peer <edwin.peer@broadcom.com>
Wed, 26 Aug 2020 05:08:38 +0000 (01:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 14:19:03 +0000 (07:19 -0700)
commitd1c66e3aea8aabf5cb90e950e2d60848e1b6a6e5
tree2a29e3008d4d07f555704697980a78437fe442fe
parent1ef31447fda235c45b93a686d2b6db8c8eddfa12
bnxt_en: init RSS table for Minimal-Static VF reservation

There are no VF rings available during probe when the device is configured
using the Minimal-Static reservation strategy. In this case, the RSS
indirection table can only be initialized later, during bnxt_open_nic().
However, this was not happening because the rings will already have been
reserved via bnxt_init_dflt_ring_mode(), causing bnxt_need_reserve_rings()
to return false in bnxt_reserve_rings() and bypass the RSS table init.

Solve this by pushing the call to bnxt_set_dflt_rss_indir_tbl() into
__bnxt_reserve_rings(), which is common to both paths and is called
whenever ring configuration is changed. After doing this, the RSS table
init that must be called from bnxt_init_one() happens implicitly via
bnxt_set_default_rings(), necessitating doing the allocation earlier in
order to avoid a null pointer dereference.

Fixes: d61b49c64761 ("bnxt_en: Implement ethtool -X to set indirection table.")
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c