diff options
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index f2c622e78802..ac685ad4d877 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -5122,15 +5122,17 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc, | |||
5122 | u8 *bw_share) | 5122 | u8 *bw_share) |
5123 | { | 5123 | { |
5124 | struct i40e_aqc_configure_vsi_tc_bw_data bw_data; | 5124 | struct i40e_aqc_configure_vsi_tc_bw_data bw_data; |
5125 | struct i40e_pf *pf = vsi->back; | ||
5125 | i40e_status ret; | 5126 | i40e_status ret; |
5126 | int i; | 5127 | int i; |
5127 | 5128 | ||
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) | ||
5129 | return 0; | 5131 | return 0; |
5130 | if (!vsi->mqprio_qopt.qopt.hw) { | 5132 | if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) { |
5131 | ret = i40e_set_bw_limit(vsi, vsi->seid, 0); | 5133 | ret = i40e_set_bw_limit(vsi, vsi->seid, 0); |
5132 | if (ret) | 5134 | if (ret) |
5133 | dev_info(&vsi->back->pdev->dev, | 5135 | dev_info(&pf->pdev->dev, |
5134 | "Failed to reset tx rate for vsi->seid %u\n", | 5136 | "Failed to reset tx rate for vsi->seid %u\n", |
5135 | vsi->seid); | 5137 | vsi->seid); |
5136 | return ret; | 5138 | return ret; |
@@ -5139,12 +5141,11 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc, | |||
5139 | for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) | 5141 | for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) |
5140 | bw_data.tc_bw_credits[i] = bw_share[i]; | 5142 | bw_data.tc_bw_credits[i] = bw_share[i]; |
5141 | 5143 | ||
5142 | ret = i40e_aq_config_vsi_tc_bw(&vsi->back->hw, vsi->seid, &bw_data, | 5144 | ret = i40e_aq_config_vsi_tc_bw(&pf->hw, vsi->seid, &bw_data, NULL); |
5143 | NULL); | ||
5144 | if (ret) { | 5145 | if (ret) { |
5145 | dev_info(&vsi->back->pdev->dev, | 5146 | dev_info(&pf->pdev->dev, |
5146 | "AQ command Config VSI BW allocation per TC failed = %d\n", | 5147 | "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); |
5148 | return -EINVAL; | 5149 | return -EINVAL; |
5149 | } | 5150 | } |
5150 | 5151 | ||