fm10k: introduce ITR_IS_ADAPTIVE macro
Define a macro for identifying when the itr value is dynamic or adaptive. The concept was taken from i40e. This helps make clear what the check is, and reduces the line length to something more reasonable in a few places. 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>
This commit is contained in:
committed by
Jeff Kirsher
parent
20076fa185
commit
584373f5b9
@@ -701,12 +701,10 @@ static int fm10k_get_coalesce(struct net_device *dev,
|
||||
{
|
||||
struct fm10k_intfc *interface = netdev_priv(dev);
|
||||
|
||||
ec->use_adaptive_tx_coalesce =
|
||||
!!(interface->tx_itr & FM10K_ITR_ADAPTIVE);
|
||||
ec->use_adaptive_tx_coalesce = ITR_IS_ADAPTIVE(interface->tx_itr);
|
||||
ec->tx_coalesce_usecs = interface->tx_itr & ~FM10K_ITR_ADAPTIVE;
|
||||
|
||||
ec->use_adaptive_rx_coalesce =
|
||||
!!(interface->rx_itr & FM10K_ITR_ADAPTIVE);
|
||||
ec->use_adaptive_rx_coalesce = ITR_IS_ADAPTIVE(interface->rx_itr);
|
||||
ec->rx_coalesce_usecs = interface->rx_itr & ~FM10K_ITR_ADAPTIVE;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user