Lines Matching full:masks

143 	/* 'dont_care' and 'nvr_mtch' masks cannot overlap */  in ice_gen_key_word()
225 * @upd: array of 8-bit masks that determine what key portion to update
226 * @dc: array of 8-bit masks that make up the don't care mask
227 * @nm: array of 8-bit masks that make up the never match mask
1172 /* Scan the enabled masks on this profile, for the specified idx */ in ice_prof_has_mask_idx()
1173 for (i = hw->blk[blk].masks.first; i < hw->blk[blk].masks.first + in ice_prof_has_mask_idx()
1174 hw->blk[blk].masks.count; i++) in ice_prof_has_mask_idx()
1176 if (hw->blk[blk].masks.masks[i].in_use && in ice_prof_has_mask_idx()
1177 hw->blk[blk].masks.masks[i].idx == idx) { in ice_prof_has_mask_idx()
1179 if (hw->blk[blk].masks.masks[i].mask == mask) in ice_prof_has_mask_idx()
1200 * @masks: masks to match
1203 ice_prof_has_mask(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 *masks) in ice_prof_has_mask() argument
1209 if (!ice_prof_has_mask_idx(hw, blk, prof, i, masks[i])) in ice_prof_has_mask()
1220 * @masks: masks for FV
1226 struct ice_fv_word *fv, u16 *masks, bool symm, in ice_find_prof_id_with_mask() argument
1247 /* check if masks settings are the same for this profile */ in ice_find_prof_id_with_mask()
1248 if (masks && !ice_prof_has_mask(hw, blk, i, masks)) in ice_find_prof_id_with_mask()
1426 ice_debug(hw, ICE_DBG_PKG, "No profile masks for block %d\n", in ice_write_prof_mask_reg()
1457 ice_debug(hw, ICE_DBG_PKG, "No profile masks for block %d\n", in ice_write_prof_mask_enable_res()
1468 * ice_init_prof_masks - initial prof masks
1477 mutex_init(&hw->blk[blk].masks.lock); in ice_init_prof_masks()
1481 hw->blk[blk].masks.count = per_pf; in ice_init_prof_masks()
1482 hw->blk[blk].masks.first = hw->pf_id * per_pf; in ice_init_prof_masks()
1484 memset(hw->blk[blk].masks.masks, 0, sizeof(hw->blk[blk].masks.masks)); in ice_init_prof_masks()
1486 for (i = hw->blk[blk].masks.first; in ice_init_prof_masks()
1487 i < hw->blk[blk].masks.first + hw->blk[blk].masks.count; i++) in ice_init_prof_masks()
1492 * ice_init_all_prof_masks - initialize all prof masks
1521 mutex_lock(&hw->blk[blk].masks.lock); in ice_alloc_prof_mask()
1523 for (i = hw->blk[blk].masks.first; in ice_alloc_prof_mask()
1524 i < hw->blk[blk].masks.first + hw->blk[blk].masks.count; i++) in ice_alloc_prof_mask()
1525 if (hw->blk[blk].masks.masks[i].in_use) { in ice_alloc_prof_mask()
1529 if (hw->blk[blk].masks.masks[i].mask == mask && in ice_alloc_prof_mask()
1530 hw->blk[blk].masks.masks[i].idx == idx) { in ice_alloc_prof_mask()
1554 hw->blk[blk].masks.masks[i].in_use = true; in ice_alloc_prof_mask()
1555 hw->blk[blk].masks.masks[i].mask = mask; in ice_alloc_prof_mask()
1556 hw->blk[blk].masks.masks[i].idx = idx; in ice_alloc_prof_mask()
1557 hw->blk[blk].masks.masks[i].ref = 0; in ice_alloc_prof_mask()
1561 hw->blk[blk].masks.masks[i].ref++; in ice_alloc_prof_mask()
1566 mutex_unlock(&hw->blk[blk].masks.lock); in ice_alloc_prof_mask()
1583 if (!(mask_idx >= hw->blk[blk].masks.first && in ice_free_prof_mask()
1584 mask_idx < hw->blk[blk].masks.first + hw->blk[blk].masks.count)) in ice_free_prof_mask()
1587 mutex_lock(&hw->blk[blk].masks.lock); in ice_free_prof_mask()
1589 if (!hw->blk[blk].masks.masks[mask_idx].in_use) in ice_free_prof_mask()
1592 if (hw->blk[blk].masks.masks[mask_idx].ref > 1) { in ice_free_prof_mask()
1593 hw->blk[blk].masks.masks[mask_idx].ref--; in ice_free_prof_mask()
1598 hw->blk[blk].masks.masks[mask_idx].in_use = false; in ice_free_prof_mask()
1599 hw->blk[blk].masks.masks[mask_idx].mask = 0; in ice_free_prof_mask()
1600 hw->blk[blk].masks.masks[mask_idx].idx = 0; in ice_free_prof_mask()
1608 mutex_unlock(&hw->blk[blk].masks.lock); in ice_free_prof_mask()
1614 * ice_free_prof_masks - free all profile masks for a profile
1647 mutex_lock(&hw->blk[blk].masks.lock); in ice_shutdown_prof_masks()
1649 for (i = hw->blk[blk].masks.first; in ice_shutdown_prof_masks()
1650 i < hw->blk[blk].masks.first + hw->blk[blk].masks.count; i++) { in ice_shutdown_prof_masks()
1653 hw->blk[blk].masks.masks[i].in_use = false; in ice_shutdown_prof_masks()
1654 hw->blk[blk].masks.masks[i].idx = 0; in ice_shutdown_prof_masks()
1655 hw->blk[blk].masks.masks[i].mask = 0; in ice_shutdown_prof_masks()
1658 mutex_unlock(&hw->blk[blk].masks.lock); in ice_shutdown_prof_masks()
1659 mutex_destroy(&hw->blk[blk].masks.lock); in ice_shutdown_prof_masks()
1679 * @masks: masks
1683 u16 *masks) in ice_update_prof_masking() argument
1695 if (masks[i] && masks[i] != 0xFFFF) { in ice_update_prof_masking()
1696 if (!ice_alloc_prof_mask(hw, blk, i, masks[i], &idx)) { in ice_update_prof_masking()
1714 /* enable the masks for this profile */ in ice_update_prof_masking()
1717 /* store enabled masks with profile so that they can be freed later */ in ice_update_prof_masking()
2730 * This function enable any of the masks selected by the mask select parameter
3036 * @masks: mask for extraction sequence
3048 struct ice_fv_word *es, u16 *masks, bool symm, bool fd_swap) in ice_add_prof() argument
3062 status = ice_find_prof_id_with_mask(hw, blk, es, masks, symm, &prof_id); in ice_add_prof()
3082 status = ice_update_prof_masking(hw, blk, prof_id, masks); in ice_add_prof()
3217 /* Masks to invoke a never match entry */ in ice_rel_tcam_idx()
3662 /* for entries with empty attribute masks, allocate entry from in ice_prof_tcam_ena_dis()
3783 /* Masks that ignore flags */ in ice_add_prof_id_vsig()
3826 /* for entries with empty attribute masks, allocate entry from in ice_add_prof_id_vsig()