Commit ec1d1d23 authored by Vignesh Sridhar's avatar Vignesh Sridhar Committed by Tony Nguyen

ice: Clear and free XLT entries on reset

This fix has been added to address memory leak issues resulting from
triggering a sudden driver reset which does not allow us to follow our
normal removal flows for SW XLT entries for advanced features.

- Adding call to destroy flow profile locks when clearing SW XLT tables.

- Extraction sequence entries were not correctly cleared previously
which could cause ownership conflicts for repeated reset-replay calls.

Fixes: 31ad4e4e ("ice: Allocate flow profile")
Signed-off-by: default avatarVignesh Sridhar <vignesh.sridhar@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent a8fffd7a
...@@ -2921,6 +2921,8 @@ static void ice_free_flow_profs(struct ice_hw *hw, u8 blk_idx) ...@@ -2921,6 +2921,8 @@ static void ice_free_flow_profs(struct ice_hw *hw, u8 blk_idx)
ICE_FLOW_ENTRY_HNDL(e)); ICE_FLOW_ENTRY_HNDL(e));
list_del(&p->l_entry); list_del(&p->l_entry);
mutex_destroy(&p->entries_lock);
devm_kfree(ice_hw_to_dev(hw), p); devm_kfree(ice_hw_to_dev(hw), p);
} }
mutex_unlock(&hw->fl_profs_locks[blk_idx]); mutex_unlock(&hw->fl_profs_locks[blk_idx]);
...@@ -3038,7 +3040,7 @@ void ice_clear_hw_tbls(struct ice_hw *hw) ...@@ -3038,7 +3040,7 @@ void ice_clear_hw_tbls(struct ice_hw *hw)
memset(prof_redir->t, 0, memset(prof_redir->t, 0,
prof_redir->count * sizeof(*prof_redir->t)); prof_redir->count * sizeof(*prof_redir->t));
memset(es->t, 0, es->count * sizeof(*es->t)); memset(es->t, 0, es->count * sizeof(*es->t) * es->fvw);
memset(es->ref_count, 0, es->count * sizeof(*es->ref_count)); memset(es->ref_count, 0, es->count * sizeof(*es->ref_count));
memset(es->written, 0, es->count * sizeof(*es->written)); memset(es->written, 0, es->count * sizeof(*es->written));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment