Skip to content

Commit

Permalink
ice: Optimize a few bitmap operations
Browse files Browse the repository at this point in the history
When a bitmap is local to a function, it is safe to use the non-atomic
__[set|clear]_bit(). No concurrent accesses can occur.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
  • Loading branch information
Christophe JAILLET authored and Tony Nguyen committed Jan 6, 2022
1 parent a5c259b commit e75ed29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/intel/ice/ice_flex_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -4440,7 +4440,7 @@ ice_update_fd_swap(struct ice_hw *hw, u16 prof_id, struct ice_fv_word *es)
for (j = 0; j < ICE_FD_SRC_DST_PAIR_COUNT; j++)
if (es[i].prot_id == ice_fd_pairs[j].prot_id &&
es[i].off == ice_fd_pairs[j].off) {
set_bit(j, pair_list);
__set_bit(j, pair_list);
pair_start[j] = i;
}
}
Expand Down Expand Up @@ -4710,7 +4710,7 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
if (test_bit(ptg, ptgs_used))
continue;

set_bit(ptg, ptgs_used);
__set_bit(ptg, ptgs_used);
/* Check to see there are any attributes for
* this PTYPE, and add them if found.
*/
Expand Down Expand Up @@ -5339,7 +5339,7 @@ ice_adj_prof_priorities(struct ice_hw *hw, enum ice_block blk, u16 vsig,
}

/* keep track of used ptgs */
set_bit(t->tcam[i].ptg, ptgs_used);
__set_bit(t->tcam[i].ptg, ptgs_used);
}
}

Expand Down

0 comments on commit e75ed29

Please sign in to comment.