Skip to content

Commit fa38e30

Browse files
mszaparJeff Kirsher
authored andcommitted
i40e: Fix for Tx timeouts when interface is brought up if DCB is enabled
If interface is connected to switch port configured for DCB there are TX timeouts when bringing up interface. Problem started appearing after adding in i40e driver code mqprio hardware offload mode. In function i40e_vsi_configure_bw_alloc was added resetting BW rate which should be executing when mqprio qdisc is removed but was also when there was no mqprio qdisc added and DCB was enabled. In this patch was added additional check for DCB flag so now when DCB is enabled the correct DCB configs from before mqprio patch are restored. Signed-off-by: Martyna Szapar <martyna.szapar@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 939b701 commit fa38e30

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5122,15 +5122,17 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
51225122
u8 *bw_share)
51235123
{
51245124
struct i40e_aqc_configure_vsi_tc_bw_data bw_data;
5125+
struct i40e_pf *pf = vsi->back;
51255126
i40e_status ret;
51265127
int i;
51275128

5128-
if (vsi->back->flags & I40E_FLAG_TC_MQPRIO)
5129+
/* There is no need to reset BW when mqprio mode is on. */
5130+
if (pf->flags & I40E_FLAG_TC_MQPRIO)
51295131
return 0;
5130-
if (!vsi->mqprio_qopt.qopt.hw) {
5132+
if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) {
51315133
ret = i40e_set_bw_limit(vsi, vsi->seid, 0);
51325134
if (ret)
5133-
dev_info(&vsi->back->pdev->dev,
5135+
dev_info(&pf->pdev->dev,
51345136
"Failed to reset tx rate for vsi->seid %u\n",
51355137
vsi->seid);
51365138
return ret;
@@ -5139,12 +5141,11 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
51395141
for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
51405142
bw_data.tc_bw_credits[i] = bw_share[i];
51415143

5142-
ret = i40e_aq_config_vsi_tc_bw(&vsi->back->hw, vsi->seid, &bw_data,
5143-
NULL);
5144+
ret = i40e_aq_config_vsi_tc_bw(&pf->hw, vsi->seid, &bw_data, NULL);
51445145
if (ret) {
5145-
dev_info(&vsi->back->pdev->dev,
5146+
dev_info(&pf->pdev->dev,
51465147
"AQ command Config VSI BW allocation per TC failed = %d\n",
5147-
vsi->back->hw.aq.asq_last_status);
5148+
pf->hw.aq.asq_last_status);
51485149
return -EINVAL;
51495150
}
51505151

0 commit comments

Comments
 (0)