i40e: Fix reset bw limit when DCB enabled with 1 TC
There was an AQ error I40E_AQ_RC_EINVAL when trying to reset bw limit as part of bw allocation setup. This was caused by trying to reset bw limit with DCB enabled. Bw limit should not be reset when DCB is enabled. The code was relying on the pf->flags to check if DCB is enabled but if only 1 TC is available this flag will not be set even though DCB is enabled. Add a check for number of TC and if it is 1 don't try to reset bw limit even if pf->flags shows DCB as disabled. Fixes: fa38e30a ("i40e: Fix for Tx timeouts when interface is brought up if DCB is enabled") Suggested-by: Alexander Lobakin <alexandr.lobakin@intel.com> # Flatten the condition Signed-off-by: NSylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: NJedrzej Jagielski <jedrzej.jagielski@intel.com> Reviewed-by: NAlexander Lobakin <alexandr.lobakin@intel.com> Tested-by: NImam Hassan Reza Biswas <imam.hassan.reza.biswas@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Showing
想要评论请 注册 或 登录