mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: 61dc79ced7 ("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>
This commit is contained in:
committed by
Tony Nguyen
parent
31b6298fd8
commit
bf13502ed5
@@ -384,9 +384,14 @@ struct ice_ring_container {
|
||||
/* this matches the maximum number of ITR bits, but in usec
|
||||
* values, so it is shifted left one bit (bit zero is ignored)
|
||||
*/
|
||||
u16 itr_setting:13;
|
||||
u16 itr_reserved:2;
|
||||
u16 itr_mode:1;
|
||||
union {
|
||||
struct {
|
||||
u16 itr_setting:13;
|
||||
u16 itr_reserved:2;
|
||||
u16 itr_mode:1;
|
||||
};
|
||||
u16 itr_settings;
|
||||
};
|
||||
enum ice_container_type type;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user