ice: fix writeback enable logic
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Sat, 21 Nov 2020 00:39:34 +0000 (16:39 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 9 Feb 2021 00:27:01 +0000 (16:27 -0800)
commit1d9f7ca324a9b73bb50ed7df58e155d1c37e1b9a
treea033338c1aac0590e4f086c342d113182d396e67
parent4f8a14976aa4b3304e83ff9b4e0a466a3131df3c
ice: fix writeback enable logic

The writeback enable logic was incorrectly implemented (due to
misunderstanding what the side effects of the implementation would be
during polling).

Fix this logic issue, while implementing a new feature allowing the user
to control the writeback frequency using the knobs for controlling
interrupt throttling that we already have.  Basically if you leave
adaptive interrupts enabled, the writeback frequency will be varied even
if busy_polling or if napi-poll is in use.  If the interrupt rates are
set to a fixed value by ethtool -C and adaptive is off, the driver will
allow the user-set interrupt rate to guide how frequently the hardware
will complete descriptors to the driver.

Effectively the user will get a control over the hardware efficiency,
allowing the choice between immediate interrupts or delayed up to a
maximum of the interrupt rate, even when interrupts are disabled
during polling.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Co-developed-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c
drivers/net/ethernet/intel/ice/ice_txrx.h