]> git.baikalelectronics.ru Git - kernel.git/commit
i40e/i40evf: Clean up logic for adaptive ITR
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 29 Dec 2017 13:49:53 +0000 (08:49 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 12 Feb 2018 18:35:49 +0000 (10:35 -0800)
commit220e4f0b0f73446255824a5cdf2aedcc4bfa661b
tree4ddce1e9c08a5b52f2f4cd06ee505e8755485557
parent528b37922facd03887c6348edfc7fb555e9dc4b5
i40e/i40evf: Clean up logic for adaptive ITR

The logic for dynamic ITR update is confusing at best as there were odd
paths chosen for how to find the rings associated with a given queue based
on the vector index and other inconsistencies throughout the code.

This patch is an attempt to clean up the logic so that we can more easily
understand what is going on. Specifically if there is a Rx or Tx ring that
is enabled in dynamic mode on the q_vector it is allowed to override the
other side of the interrupt moderation. While it isn't correct all this
patch is doing is cleaning up the logic for now so that when we come
through and fix it we can more easily identify that this is wrong.

The other big change made here is that we replace references to:
vsi->rx_rings[q_vector->v_idx]->itr_setting
with:
q_vector->rx.ring->itr_setting

The general idea is we can avoid the long pointer chase since just
accessing q_vector->rx.ring is a single pointer access versus having to
chase down vsi->rx_rings, and then finding the pointer in the array, and
finally chasing down the itr_setting from there.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c