• Michal Wilczynski's avatar
    ice: Fix interrupt moderation settings getting cleared · bf13502e
    Michal Wilczynski authored
    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: 61dc79ce ("ice: Restore interrupt throttle settings after VSI rebuild")
    Signed-off-by: default avatarMichal Wilczynski <michal.wilczynski@intel.com>
    Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    bf13502e
ice_lib.c 109 KB