]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix oops at i40e_rebuild()
authorArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Thu, 18 Feb 2021 21:55:35 +0000 (21:55 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 25 Mar 2021 19:49:42 +0000 (12:49 -0700)
commit0310ec66b7079f4b6e31aa3cbb91530a3b480173
tree51a615d14ee89fe9e0cc32b4fe65d6d44c4c31b8
parent53ec395d7b97f72039cad0af6c7232e7095143bb
i40e: Fix oops at i40e_rebuild()

Setup TC before the i40e_setup_pf_switch() call.
Memory must be initialized for all the queues
before using its resources.

Previously it could be possible that a call:
xdp_rxq_info_reg(&rx_ring->xdp_rxq, rx_ring->netdev,
rx_ring->queue_index, rx_ring->q_vector->napi.napi_id);
was made with q_vector being null.

Oops could show up with the following sequence:
- no driver loaded
- FW LLDP agent is on (flag disable-fw-lldp:off)
- link is up
- DCB configured with number of Traffic Classes that will not divide
  completely the default number of queues (usually cpu cores)
- driver load
- set private flag: disable-fw-lldp:on

Fixes: 6ae0b65e5616 ("i40e: Add init and default config of software based DCB")
Fixes: 4884ae5812ec ("xsk: Propagate napi_id to XDP socket Rx path")
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c