Lines Matching refs:prof
592 struct ice_flow_prof *prof; member
667 sz = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_VLAN) ? in ice_flow_calc_seg_sz()
671 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4) in ice_flow_calc_seg_sz()
673 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV6) in ice_flow_calc_seg_sz()
675 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ARP) in ice_flow_calc_seg_sz()
677 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK) in ice_flow_calc_seg_sz()
682 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ICMP) in ice_flow_calc_seg_sz()
684 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_TCP) in ice_flow_calc_seg_sz()
686 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_UDP) in ice_flow_calc_seg_sz()
688 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_SCTP) in ice_flow_calc_seg_sz()
703 struct ice_flow_prof *prof; in ice_flow_proc_seg_hdrs() local
708 prof = params->prof; in ice_flow_proc_seg_hdrs()
710 for (i = 0; i < params->prof->segs_cnt; i++) { in ice_flow_proc_seg_hdrs()
714 hdrs = prof->segs[i].hdrs; in ice_flow_proc_seg_hdrs()
911 flds = params->prof->segs[seg].fields; in ice_flow_xtract_fld()
1025 prot_id = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4) ? in ice_flow_xtract_fld()
1107 if (!params->prof->segs[seg].raws_cnt) in ice_flow_xtract_raws()
1110 if (params->prof->segs[seg].raws_cnt > in ice_flow_xtract_raws()
1111 ARRAY_SIZE(params->prof->segs[seg].raws)) in ice_flow_xtract_raws()
1121 for (i = 0; i < params->prof->segs[seg].raws_cnt; i++) { in ice_flow_xtract_raws()
1125 raw = ¶ms->prof->segs[seg].raws[i]; in ice_flow_xtract_raws()
1180 struct ice_flow_prof *prof = params->prof; in ice_flow_create_xtrct_seq() local
1184 for (i = 0; i < prof->segs_cnt; i++) { in ice_flow_create_xtrct_seq()
1185 u64 match = params->prof->segs[i].match; in ice_flow_create_xtrct_seq()
1254 struct ice_flow_prof *p, *prof = NULL; in ice_flow_find_prof_conds() local
1279 prof = p; in ice_flow_find_prof_conds()
1285 return prof; in ice_flow_find_prof_conds()
1359 struct ice_flow_prof **prof) in ice_flow_add_prof_sync() argument
1365 if (!prof) in ice_flow_add_prof_sync()
1372 params->prof = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*params->prof), in ice_flow_add_prof_sync()
1374 if (!params->prof) { in ice_flow_add_prof_sync()
1386 params->prof->id = prof_id; in ice_flow_add_prof_sync()
1387 params->prof->dir = dir; in ice_flow_add_prof_sync()
1388 params->prof->segs_cnt = segs_cnt; in ice_flow_add_prof_sync()
1394 memcpy(¶ms->prof->segs[i], &segs[i], sizeof(*segs)); in ice_flow_add_prof_sync()
1411 INIT_LIST_HEAD(¶ms->prof->entries); in ice_flow_add_prof_sync()
1412 mutex_init(¶ms->prof->entries_lock); in ice_flow_add_prof_sync()
1413 *prof = params->prof; in ice_flow_add_prof_sync()
1417 devm_kfree(ice_hw_to_dev(hw), params->prof); in ice_flow_add_prof_sync()
1434 struct ice_flow_prof *prof) in ice_flow_rem_prof_sync() argument
1439 if (!list_empty(&prof->entries)) { in ice_flow_rem_prof_sync()
1442 mutex_lock(&prof->entries_lock); in ice_flow_rem_prof_sync()
1444 list_for_each_entry_safe(e, t, &prof->entries, l_entry) { in ice_flow_rem_prof_sync()
1450 mutex_unlock(&prof->entries_lock); in ice_flow_rem_prof_sync()
1454 status = ice_rem_prof(hw, blk, prof->id); in ice_flow_rem_prof_sync()
1456 list_del(&prof->l_entry); in ice_flow_rem_prof_sync()
1457 mutex_destroy(&prof->entries_lock); in ice_flow_rem_prof_sync()
1458 devm_kfree(ice_hw_to_dev(hw), prof); in ice_flow_rem_prof_sync()
1476 struct ice_flow_prof *prof, u16 vsi_handle) in ice_flow_assoc_prof() argument
1480 if (!test_bit(vsi_handle, prof->vsis)) { in ice_flow_assoc_prof()
1484 prof->id); in ice_flow_assoc_prof()
1486 set_bit(vsi_handle, prof->vsis); in ice_flow_assoc_prof()
1507 struct ice_flow_prof *prof, u16 vsi_handle) in ice_flow_disassoc_prof() argument
1511 if (test_bit(vsi_handle, prof->vsis)) { in ice_flow_disassoc_prof()
1515 prof->id); in ice_flow_disassoc_prof()
1517 clear_bit(vsi_handle, prof->vsis); in ice_flow_disassoc_prof()
1539 struct ice_flow_prof **prof) in ice_flow_add_prof() argument
1559 prof); in ice_flow_add_prof()
1561 list_add(&(*prof)->l_entry, &hw->fl_profs[blk]); in ice_flow_add_prof()
1576 struct ice_flow_prof *prof; in ice_flow_rem_prof() local
1581 prof = ice_flow_find_prof_id(hw, blk, prof_id); in ice_flow_rem_prof()
1582 if (!prof) { in ice_flow_rem_prof()
1588 status = ice_flow_rem_prof_sync(hw, blk, prof); in ice_flow_rem_prof()
1613 struct ice_flow_prof *prof; in ice_flow_add_entry() local
1625 prof = ice_flow_find_prof_id(hw, blk, prof_id); in ice_flow_add_entry()
1626 if (!prof) { in ice_flow_add_entry()
1636 status = ice_flow_assoc_prof(hw, blk, prof, vsi_handle); in ice_flow_add_entry()
1645 e->prof = prof; in ice_flow_add_entry()
1657 mutex_lock(&prof->entries_lock); in ice_flow_add_entry()
1658 list_add(&e->l_entry, &prof->entries); in ice_flow_add_entry()
1659 mutex_unlock(&prof->entries_lock); in ice_flow_add_entry()
1682 struct ice_flow_prof *prof; in ice_flow_rem_entry() local
1691 prof = entry->prof; in ice_flow_rem_entry()
1693 if (prof) { in ice_flow_rem_entry()
1694 mutex_lock(&prof->entries_lock); in ice_flow_rem_entry()
1696 mutex_unlock(&prof->entries_lock); in ice_flow_rem_entry()
1821 struct ice_flow_prof *prof; in ice_flow_rem_vsi_prof() local
1828 prof = ice_flow_find_prof_id(hw, ICE_BLK_FD, prof_id); in ice_flow_rem_vsi_prof()
1829 if (!prof) { in ice_flow_rem_vsi_prof()
1836 if (!list_empty(&prof->entries)) { in ice_flow_rem_vsi_prof()
1839 mutex_lock(&prof->entries_lock); in ice_flow_rem_vsi_prof()
1840 list_for_each_entry_safe(e, t, &prof->entries, l_entry) { in ice_flow_rem_vsi_prof()
1848 mutex_unlock(&prof->entries_lock); in ice_flow_rem_vsi_prof()
1854 status = ice_flow_disassoc_prof(hw, ICE_BLK_FD, prof, vsi_handle); in ice_flow_rem_vsi_prof()
1987 ice_rem_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof) in ice_rem_rss_list() argument
1996 if (r->hashed_flds == prof->segs[prof->segs_cnt - 1].match && in ice_rem_rss_list()
1997 r->packet_hdr == prof->segs[prof->segs_cnt - 1].hdrs) { in ice_rem_rss_list()
2016 ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof) in ice_add_rss_list() argument
2021 if (r->hashed_flds == prof->segs[prof->segs_cnt - 1].match && in ice_add_rss_list()
2022 r->packet_hdr == prof->segs[prof->segs_cnt - 1].hdrs) { in ice_add_rss_list()
2032 rss_cfg->hashed_flds = prof->segs[prof->segs_cnt - 1].match; in ice_add_rss_list()
2033 rss_cfg->packet_hdr = prof->segs[prof->segs_cnt - 1].hdrs; in ice_add_rss_list()
2076 struct ice_flow_prof *prof = NULL; in ice_add_rss_cfg_sync() local
2097 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_add_rss_cfg_sync()
2101 if (prof) in ice_add_rss_cfg_sync()
2109 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_add_rss_cfg_sync()
2111 if (prof) { in ice_add_rss_cfg_sync()
2112 status = ice_flow_disassoc_prof(hw, blk, prof, vsi_handle); in ice_add_rss_cfg_sync()
2114 ice_rem_rss_list(hw, vsi_handle, prof); in ice_add_rss_cfg_sync()
2119 if (bitmap_empty(prof->vsis, ICE_MAX_VSI)) { in ice_add_rss_cfg_sync()
2120 status = ice_flow_rem_prof(hw, blk, prof->id); in ice_add_rss_cfg_sync()
2129 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_add_rss_cfg_sync()
2132 if (prof) { in ice_add_rss_cfg_sync()
2133 status = ice_flow_assoc_prof(hw, blk, prof, vsi_handle); in ice_add_rss_cfg_sync()
2135 status = ice_add_rss_list(hw, vsi_handle, prof); in ice_add_rss_cfg_sync()
2146 segs, segs_cnt, &prof); in ice_add_rss_cfg_sync()
2150 status = ice_flow_assoc_prof(hw, blk, prof, vsi_handle); in ice_add_rss_cfg_sync()
2155 ice_flow_rem_prof(hw, blk, prof->id); in ice_add_rss_cfg_sync()
2159 status = ice_add_rss_list(hw, vsi_handle, prof); in ice_add_rss_cfg_sync()
2214 struct ice_flow_prof *prof; in ice_rem_rss_cfg_sync() local
2227 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_rem_rss_cfg_sync()
2230 if (!prof) { in ice_rem_rss_cfg_sync()
2235 status = ice_flow_disassoc_prof(hw, blk, prof, vsi_handle); in ice_rem_rss_cfg_sync()
2242 ice_rem_rss_list(hw, vsi_handle, prof); in ice_rem_rss_cfg_sync()
2244 if (bitmap_empty(prof->vsis, ICE_MAX_VSI)) in ice_rem_rss_cfg_sync()
2245 status = ice_flow_rem_prof(hw, blk, prof->id); in ice_rem_rss_cfg_sync()