ixgbe: fix setting of TXDCTL.WTRHESH when ITR is set to 0 and no BQL
authorEmil Tantilov <emil.s.tantilov@intel.com>
Thu, 18 Sep 2014 08:05:02 +0000 (08:05 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 2 Oct 2014 09:17:42 +0000 (02:17 -0700)
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>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index cff383b1cbb04d7ebeb9f696b94ad4caeaf7921e..3ce4a258f94534da25304c9138e0bf28fdd3c9ff 100644 (file)
@@ -2267,7 +2267,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
        if (adapter->q_vector[0]->tx.count && adapter->q_vector[0]->rx.count)
                adapter->tx_itr_setting = adapter->rx_itr_setting;
 
-#if IS_ENABLED(CONFIG_BQL)
        /* detect ITR changes that require update of TXDCTL.WTHRESH */
        if ((adapter->tx_itr_setting != 1) &&
            (adapter->tx_itr_setting < IXGBE_100K_ITR)) {
@@ -2279,7 +2278,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
                    (tx_itr_prev < IXGBE_100K_ITR))
                        need_reset = true;
        }
-#endif
+
        /* check the old value and enable RSC if necessary */
        need_reset |= ixgbe_update_rsc(adapter);
 
index 2daf257dea7ca1f2747f52498370cb04e9352b3b..d677b5a23b5869a71a8d9f04fa7f7d1e6762ea05 100644 (file)
@@ -2982,11 +2982,7 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
         * to or less than the number of on chip descriptors, which is
         * currently 40.
         */
-#if IS_ENABLED(CONFIG_BQL)
        if (!ring->q_vector || (ring->q_vector->itr < IXGBE_100K_ITR))
-#else
-       if (!ring->q_vector || (ring->q_vector->itr < 8))
-#endif
                txdctl |= (1 << 16);    /* WTHRESH = 1 */
        else
                txdctl |= (8 << 16);    /* WTHRESH = 8 */