Commit 436ea956 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher

fm10k: use macro for default Tx and Rx ITR values

Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Reviewed-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 242722dd
...@@ -175,6 +175,8 @@ struct fm10k_ring_container { ...@@ -175,6 +175,8 @@ struct fm10k_ring_container {
#define ITR_IS_ADAPTIVE(itr) (!!(itr & FM10K_ITR_ADAPTIVE)) #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) #define FM10K_ITR_ENABLE (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
static inline struct netdev_queue *txring_txq(const struct fm10k_ring *ring) static inline struct netdev_queue *txring_txq(const struct fm10k_ring *ring)
......
...@@ -729,10 +729,10 @@ static int fm10k_set_coalesce(struct net_device *dev, ...@@ -729,10 +729,10 @@ static int fm10k_set_coalesce(struct net_device *dev,
/* set initial values for adaptive ITR */ /* set initial values for adaptive ITR */
if (ec->use_adaptive_tx_coalesce) 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) 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 */ /* update interface */
interface->tx_itr = tx_itr; interface->tx_itr = tx_itr;
......
...@@ -1771,8 +1771,8 @@ static int fm10k_sw_init(struct fm10k_intfc *interface, ...@@ -1771,8 +1771,8 @@ static int fm10k_sw_init(struct fm10k_intfc *interface,
interface->rx_ring_count = FM10K_DEFAULT_RXD; interface->rx_ring_count = FM10K_DEFAULT_RXD;
/* set default interrupt moderation */ /* set default interrupt moderation */
interface->tx_itr = FM10K_ITR_10K; interface->tx_itr = FM10K_TX_ITR_DEFAULT;
interface->rx_itr = FM10K_ITR_ADAPTIVE | FM10K_ITR_20K; interface->rx_itr = FM10K_ITR_ADAPTIVE | FM10K_RX_ITR_DEFAULT;
/* initialize vxlan_port list */ /* initialize vxlan_port list */
INIT_LIST_HEAD(&interface->vxlan_port); INIT_LIST_HEAD(&interface->vxlan_port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment