]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Fix interrupt moderation settings getting cleared
authorMichal Wilczynski <michal.wilczynski@intel.com>
Sun, 8 May 2022 23:33:48 +0000 (19:33 -0400)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 17 May 2022 17:37:09 +0000 (10:37 -0700)
commit298375e7235ebeb6dbfed4e274172c90e5e85bf1
tree1f468adf23dbff53479232a6899686bb1382a528
parentfb5ee8fac5160122ef74ad02117159547e6f2ebf
ice: Fix interrupt moderation settings getting cleared

Adaptive-rx and Adaptive-tx are interrupt moderation settings
that can be enabled/disabled using ethtool:
ethtool -C ethX adaptive-rx on/off adaptive-tx on/off

Unfortunately those settings are getting cleared after
changing number of queues, or in ethtool world 'channels':
ethtool -L ethX rx 1 tx 1

Clearing was happening due to introduction of bit fields
in ice_ring_container struct. This way only itr_setting
bits were rebuilt during ice_vsi_rebuild_set_coalesce().

Introduce an anonymous struct of bitfields and create a
union to refer to them as a single variable.
This way variable can be easily saved and restored.

Fixes: ac78f7aec5e5 ("ice: Restore interrupt throttle settings after VSI rebuild")
Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/ice/ice_txrx.h