Skip to content

Commit ffefa9f

Browse files
etantilovJeff Kirsher
authored andcommitted
ixgbe: fix setting of TXDCTL.WTRHESH when ITR is set to 0 and no BQL
This patch consolidates the logic behind dynamically setting TXDCTL.WTHRESH depending on interrupt throttle rate (ITR) setting regardless of BQL. Previously TXDCTL.WTHRESH was dynamically being set only with BQL being enabled, but we have to set it regardless of BQL when ITR is low to avoid Tx stalls/hangs. CC: John Greene <jogreene@redhat.com> Reported by: Masayuki Gouji <gouji.masayuki@jp.fujitsu.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 340c520 commit ffefa9f

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

‎drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
22672267
if (adapter->q_vector[0]->tx.count && adapter->q_vector[0]->rx.count)
22682268
adapter->tx_itr_setting = adapter->rx_itr_setting;
22692269

2270-
#if IS_ENABLED(CONFIG_BQL)
22712270
/* detect ITR changes that require update of TXDCTL.WTHRESH */
22722271
if ((adapter->tx_itr_setting != 1) &&
22732272
(adapter->tx_itr_setting < IXGBE_100K_ITR)) {
@@ -2279,7 +2278,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
22792278
(tx_itr_prev < IXGBE_100K_ITR))
22802279
need_reset = true;
22812280
}
2282-
#endif
2281+
22832282
/* check the old value and enable RSC if necessary */
22842283
need_reset |= ixgbe_update_rsc(adapter);
22852284

‎drivers/net/ethernet/intel/ixgbe/ixgbe_main.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2982,11 +2982,7 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
29822982
* to or less than the number of on chip descriptors, which is
29832983
* currently 40.
29842984
*/
2985-
#if IS_ENABLED(CONFIG_BQL)
29862985
if (!ring->q_vector || (ring->q_vector->itr < IXGBE_100K_ITR))
2987-
#else
2988-
if (!ring->q_vector || (ring->q_vector->itr < 8))
2989-
#endif
29902986
txdctl |= (1 << 16); /* WTHRESH = 1 */
29912987
else
29922988
txdctl |= (8 << 16); /* WTHRESH = 8 */

0 commit comments

Comments
 (0)