]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ice: Fix PF with enabled XDP going no-carrier after reset
authorLarysa Zaremba <larysa.zaremba@intel.com>
Tue, 12 Dec 2023 09:29:01 +0000 (10:29 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 18 Dec 2023 17:39:53 +0000 (09:39 -0800)
Commit 6624e780a577fc596788 ("ice: split ice_vsi_setup into smaller
functions") has refactored a bunch of code involved in PFR. In this
process, TC queue number adjustment for XDP was lost. Bring it back.

Lack of such adjustment causes interface to go into no-carrier after a
reset, if XDP program is attached, with the following message:

ice 0000:b1:00.0: Failed to set LAN Tx queue context, error: -22
ice 0000:b1:00.0 ens801f0np0: Failed to open VSI 0x0006 on switch 0x0001
ice 0000:b1:00.0: enable VSI failed, err -22, VSI index 0, type ICE_VSI_PF
ice 0000:b1:00.0: PF VSI rebuild failed: -22
ice 0000:b1:00.0: Rebuild failed, unload and reload driver

Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lib.c

index de7ba87af45dd9ad4dbff0ed2186ab7f81e529e3..1bad6e17f9befdcafe804c064b820ffeac22994a 100644 (file)
@@ -2371,6 +2371,9 @@ static int ice_vsi_cfg_tc_lan(struct ice_pf *pf, struct ice_vsi *vsi)
                } else {
                        max_txqs[i] = vsi->alloc_txq;
                }
+
+               if (vsi->type == ICE_VSI_PF)
+                       max_txqs[i] += vsi->num_xdp_txq;
        }
 
        dev_dbg(dev, "vsi->tc_cfg.ena_tc = %d\n", vsi->tc_cfg.ena_tc);