]> 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)
commit7e1f8327a2cf4d3125b1eacde54a453e1ac51c3d
tree12d3d30103660130616eb389d9b056167d06b8a7
parent3e3d214427d7836a75febfee02a4f615f0afb6fd
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