i40e/i40evf: set proper default for ITR registers
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 4 Apr 2014 04:43:07 +0000 (04:43 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 21 May 2014 10:12:09 +0000 (03:12 -0700)
Ethtool consistently reports 0 values for our ITR settings because
we never actually set them. Fix this by setting the default values
to the specified default values.

Change-ID: I2832406a66f7140f2b1230945d6ff6cbf77467c8
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index e399f9b7077766cd96f5ecfe7483c8f60d7c036c..e965cc543df1b85abf32a6d4b51ae4187e727f09 100644 (file)
@@ -6368,6 +6368,10 @@ static int i40e_sw_init(struct i40e_pf *pf)
                    I40E_FLAG_MSIX_ENABLED    |
                    I40E_FLAG_RX_1BUF_ENABLED;
 
+       /* Set default ITR */
+       pf->rx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_RX_DEF;
+       pf->tx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_TX_DEF;
+
        /* Depending on PF configurations, it is possible that the RSS
         * maximum might end up larger than the available queues
         */
index 6455280308729ea2795e86c5a0030bd9c6fbd9a5..13989ef357502829a5e7b80948d08e1cba3c9899 100644 (file)
@@ -2122,8 +2122,10 @@ static void i40evf_init_task(struct work_struct *work)
        adapter->vsi.back = adapter;
        adapter->vsi.base_vector = 1;
        adapter->vsi.work_limit = I40E_DEFAULT_IRQ_WORK;
-       adapter->vsi.rx_itr_setting = I40E_ITR_DYNAMIC;
-       adapter->vsi.tx_itr_setting = I40E_ITR_DYNAMIC;
+       adapter->vsi.rx_itr_setting = (I40E_ITR_DYNAMIC |
+                                      ITR_REG_TO_USEC(I40E_ITR_RX_DEF));
+       adapter->vsi.tx_itr_setting = (I40E_ITR_DYNAMIC |
+                                      ITR_REG_TO_USEC(I40E_ITR_TX_DEF));
        adapter->vsi.netdev = adapter->netdev;
 
        if (!adapter->netdev_registered) {