]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ice: Add support for adaptive interrupt moderation
authorBrett Creeley <brett.creeley@intel.com>
Wed, 19 Dec 2018 18:03:29 +0000 (10:03 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 15 Jan 2019 19:29:16 +0000 (11:29 -0800)
commit63f545ed1285a5f904c260ff22c958609c3c11c5
tree28e93dc5f427de3efb9bd4e352a165ab90f33dab
parent9be1d6f8c33731acd67586a4e40c0f3d56a23366
ice: Add support for adaptive interrupt moderation

Currently the driver does not support adaptive/dynamic interrupt
moderation. This patch adds support for this. Also, adaptive/dynamic
interrupt moderation is turned on by default upon driver load.

In order to support adaptive interrupt moderation, two functions were
added, ice_update_itr() and ice_itr_divisor(). These are used to
determine the current packet load and to determine a divisor based
on link speed respectively.

This patch also adds the ICE_ITR_GRAN_S define that is used in the
hot-path when setting a new ITR value. The shift is used to pet two
birds with one hand, set the ITR value while re-enabling the
interrupt. Also, the ICE_ITR_GRAN_S is defined as 1 because the device
has a ITR granularity of 2usecs.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_hw_autogen.h
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_txrx.c
drivers/net/ethernet/intel/ice/ice_txrx.h