Skip to content

Commit fe20371

Browse files
mpalczew96kuba-moo
authored andcommitted
Revert "i40e: Fix reset bw limit when DCB enabled with 1 TC"
Revert of a patch that instead of fixing a AQ error when trying to reset BW limit introduced several regressions related to creation and managing TC. Currently there are errors when creating a TC on both PF and VF. Error log: [17428.783095] i40e 0000:3b:00.1: AQ command Config VSI BW allocation per TC failed = 14 [17428.783107] i40e 0000:3b:00.1: Failed configuring TC map 0 for VSI 391 [17428.783254] i40e 0000:3b:00.1: AQ command Config VSI BW allocation per TC failed = 14 [17428.783259] i40e 0000:3b:00.1: Unable to configure TC map 0 for VSI 391 This reverts commit 3d25046. Fixes: 3d25046 (i40e: Fix reset bw limit when DCB enabled with 1 TC) Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://lore.kernel.org/r/20220223175347.1690692-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d9b5ae5 commit fe20371

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5372,24 +5372,14 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
53725372
/* There is no need to reset BW when mqprio mode is on. */
53735373
if (pf->flags & I40E_FLAG_TC_MQPRIO)
53745374
return 0;
5375-
5376-
if (!vsi->mqprio_qopt.qopt.hw) {
5377-
if (pf->flags & I40E_FLAG_DCB_ENABLED)
5378-
goto skip_reset;
5379-
5380-
if (IS_ENABLED(CONFIG_I40E_DCB) &&
5381-
i40e_dcb_hw_get_num_tc(&pf->hw) == 1)
5382-
goto skip_reset;
5383-
5375+
if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) {
53845376
ret = i40e_set_bw_limit(vsi, vsi->seid, 0);
53855377
if (ret)
53865378
dev_info(&pf->pdev->dev,
53875379
"Failed to reset tx rate for vsi->seid %u\n",
53885380
vsi->seid);
53895381
return ret;
53905382
}
5391-
5392-
skip_reset:
53935383
memset(&bw_data, 0, sizeof(bw_data));
53945384
bw_data.tc_valid_bits = enabled_tc;
53955385
for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)

0 commit comments

Comments
 (0)