]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0008-i40e-Fix-for-Tx-timeouts-when-interface-is-brought-u.patch
add patch to fix ipset memory exhaustion
[pve-kernel.git] / patches / kernel / 0008-i40e-Fix-for-Tx-timeouts-when-interface-is-brought-u.patch
CommitLineData
91b336e7
TL
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Martyna Szapar <martyna.szapar@intel.com>
3Date: Tue, 7 Aug 2018 17:11:23 -0700
4Subject: [PATCH] i40e: Fix for Tx timeouts when interface is brought up if DCB
5 is enabled
6
7If interface is connected to switch port configured for DCB there are
8TX timeouts when bringing up interface. Problem started appearing after
9adding in i40e driver code mqprio hardware offload mode. In function
10i40e_vsi_configure_bw_alloc was added resetting BW rate which should
11be executing when mqprio qdisc is removed but was also when there was
12no mqprio qdisc added and DCB was enabled. In this patch was added
13additional check for DCB flag so now when DCB is enabled the correct
14DCB configs from before mqprio patch are restored.
15
16Signed-off-by: Martyna Szapar <martyna.szapar@intel.com>
17Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
18Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
19Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20---
21 drivers/net/ethernet/intel/i40e/i40e_main.c | 15 ++++++++-------
22 1 file changed, 8 insertions(+), 7 deletions(-)
23
24diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
25index 08f7bd9001bc..7895a0af37e6 100644
26--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
27+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
28@@ -5219,15 +5219,17 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
29 u8 *bw_share)
30 {
31 struct i40e_aqc_configure_vsi_tc_bw_data bw_data;
32+ struct i40e_pf *pf = vsi->back;
33 i40e_status ret;
34 int i;
35
36- if (vsi->back->flags & I40E_FLAG_TC_MQPRIO)
37+ /* There is no need to reset BW when mqprio mode is on. */
38+ if (pf->flags & I40E_FLAG_TC_MQPRIO)
39 return 0;
40- if (!vsi->mqprio_qopt.qopt.hw) {
41+ if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) {
42 ret = i40e_set_bw_limit(vsi, vsi->seid, 0);
43 if (ret)
44- dev_info(&vsi->back->pdev->dev,
45+ dev_info(&pf->pdev->dev,
46 "Failed to reset tx rate for vsi->seid %u\n",
47 vsi->seid);
48 return ret;
49@@ -5236,12 +5238,11 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
50 for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
51 bw_data.tc_bw_credits[i] = bw_share[i];
52
53- ret = i40e_aq_config_vsi_tc_bw(&vsi->back->hw, vsi->seid, &bw_data,
54- NULL);
55+ ret = i40e_aq_config_vsi_tc_bw(&pf->hw, vsi->seid, &bw_data, NULL);
56 if (ret) {
57- dev_info(&vsi->back->pdev->dev,
58+ dev_info(&pf->pdev->dev,
59 "AQ command Config VSI BW allocation per TC failed = %d\n",
60- vsi->back->hw.aq.asq_last_status);
61+ pf->hw.aq.asq_last_status);
62 return -EINVAL;
63 }
64