]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Refactor getting/setting coalesce
authorBrett Creeley <brett.creeley@intel.com>
Tue, 16 Apr 2019 17:21:20 +0000 (10:21 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 4 May 2019 21:25:26 +0000 (14:25 -0700)
commitccf7b96639a2dfdcfdc495201079b189e726e0b6
tree12d3d30103660130616eb389d9b056167d06b8a7
parent006f5c9bc19cdbb25e964dc16325748cbac79395
ice: Refactor getting/setting coalesce

Currently if the driver has an uneven amount of Rx/Tx queues
setting the coalesce settings through ethtool will result in
an error. This is happening because in the setting coalesce
flow we are reporting an error if either Rx or Tx fails.

Also, the flow for setting/getting per_q_coalesce and
setting/getting coalesce settings for the entire device
is different.

Fix these issues by adding one function, ice_set_q_coalesce(),
and another, ice_get_q_coalesce(), that both getting/setting
per_q and entire device coalesce can use. This makes handling
the error cases generic between the two flows and simplifies
__ice_set_coalesce() and __ice_get_coalesce().

Also, add a header comment to __ice_set_coalesce().

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_ethtool.c