diff options
| author | Jesse Brandeburg <[email protected]> | 2025-06-18 11:28:53 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-07-18 16:02:28 +0000 |
| commit | 850a9a32ab6d8bdd2caf667e184e802aaa2b022d (patch) | |
| tree | 8d5debac9d94060a47d5da8b77565a93efa413d8 /drivers/net/ethernet/intel/ice/ice_flex_pipe.h | |
| parent | ice: add E835 device IDs (diff) | |
| download | kernel-850a9a32ab6d8bdd2caf667e184e802aaa2b022d.tar.gz kernel-850a9a32ab6d8bdd2caf667e184e802aaa2b022d.zip | |
ice: convert ice_add_prof() to bitmap
Previously the ice_add_prof() took an array of u8 and looped over it with
for_each_set_bit(), examining each 8 bit value as a bitmap.
This was just hard to understand and unnecessary, and was triggering
undefined behavior sanitizers with unaligned accesses within bitmap
fields (on our internal tools/builds). Since the @ptype being passed in
was already declared as a bitmap, refactor this to use native types with
the advantage of simplifying the code to use a single loop.
Co-developed-by: Jacob Keller <[email protected]>
Signed-off-by: Jacob Keller <[email protected]>
Signed-off-by: Jesse Brandeburg <[email protected]>
Signed-off-by: Aleksandr Loktionov <[email protected]>
CC: Jesse Brandeburg <[email protected]>
Signed-off-by: Przemek Kitszel <[email protected]>
Reviewed-by: Paul Menzel <[email protected]>
Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_flex_pipe.h')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_flex_pipe.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.h b/drivers/net/ethernet/intel/ice/ice_flex_pipe.h index 28b0897adf32..ee5d9f9c9d53 100644 --- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.h +++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.h @@ -39,9 +39,10 @@ bool ice_hw_ptype_ena(struct ice_hw *hw, u16 ptype); /* XLT2/VSI group functions */ int -ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[], - const struct ice_ptype_attributes *attr, u16 attr_cnt, - struct ice_fv_word *es, u16 *masks, bool symm, bool fd_swap); +ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, + unsigned long *ptypes, const struct ice_ptype_attributes *attr, + u16 attr_cnt, struct ice_fv_word *es, u16 *masks, bool symm, + bool fd_swap); struct ice_prof_map * ice_search_prof_id(struct ice_hw *hw, enum ice_block blk, u64 id); int |
