]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fm10k: use macro for default Tx and Rx ITR values
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 16 Oct 2015 17:57:08 +0000 (10:57 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 6 Dec 2015 07:55:22 +0000 (23:55 -0800)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k.h
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
drivers/net/ethernet/intel/fm10k/fm10k_pci.c

index bb799b368996cd1ab0264d1d621c586509534e1c..115033f6539e1e27035eea50953e463e35ed6852 100644 (file)
@@ -175,6 +175,8 @@ struct fm10k_ring_container {
 
 #define ITR_IS_ADAPTIVE(itr) (!!(itr & FM10K_ITR_ADAPTIVE))
 
+#define FM10K_TX_ITR_DEFAULT   FM10K_ITR_10K
+#define FM10K_RX_ITR_DEFAULT   FM10K_ITR_20K
 #define FM10K_ITR_ENABLE       (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
 
 static inline struct netdev_queue *txring_txq(const struct fm10k_ring *ring)
index a505a502bb8e3a2f62ae798784e4fee6f3d017f4..109e2111bddaace886413e27646a21d8c4f5b009 100644 (file)
@@ -729,10 +729,10 @@ static int fm10k_set_coalesce(struct net_device *dev,
 
        /* set initial values for adaptive ITR */
        if (ec->use_adaptive_tx_coalesce)
-               tx_itr = FM10K_ITR_ADAPTIVE | FM10K_ITR_10K;
+               tx_itr = FM10K_ITR_ADAPTIVE | FM10K_TX_ITR_DEFAULT;
 
        if (ec->use_adaptive_rx_coalesce)
-               rx_itr = FM10K_ITR_ADAPTIVE | FM10K_ITR_20K;
+               rx_itr = FM10K_ITR_ADAPTIVE | FM10K_RX_ITR_DEFAULT;
 
        /* update interface */
        interface->tx_itr = tx_itr;
index 1f0d9bc3bf7b0853899eebb99b962aaca8bd03c5..0cdb79e8b36e68a84634039b4128b3db04e7778a 100644 (file)
@@ -1771,8 +1771,8 @@ static int fm10k_sw_init(struct fm10k_intfc *interface,
        interface->rx_ring_count = FM10K_DEFAULT_RXD;
 
        /* set default interrupt moderation */
-       interface->tx_itr = FM10K_ITR_10K;
-       interface->rx_itr = FM10K_ITR_ADAPTIVE | FM10K_ITR_20K;
+       interface->tx_itr = FM10K_TX_ITR_DEFAULT;
+       interface->rx_itr = FM10K_ITR_ADAPTIVE | FM10K_RX_ITR_DEFAULT;
 
        /* initialize vxlan_port list */
        INIT_LIST_HEAD(&interface->vxlan_port);