Lines Matching refs:segs
629 ice_flow_val_hdrs(struct ice_flow_seg_info *segs, u8 segs_cnt) in ice_flow_val_hdrs() argument
635 if (segs[i].hdrs & ICE_FLOW_SEG_HDRS_L3_MASK && in ice_flow_val_hdrs()
636 !is_power_of_2(segs[i].hdrs & ICE_FLOW_SEG_HDRS_L3_MASK)) in ice_flow_val_hdrs()
640 if (segs[i].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK && in ice_flow_val_hdrs()
641 !is_power_of_2(segs[i].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK)) in ice_flow_val_hdrs()
669 sz = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_VLAN) ? in ice_flow_calc_seg_sz()
673 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4) in ice_flow_calc_seg_sz()
675 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV6) in ice_flow_calc_seg_sz()
677 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ARP) in ice_flow_calc_seg_sz()
679 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK) in ice_flow_calc_seg_sz()
684 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ICMP) in ice_flow_calc_seg_sz()
686 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_TCP) in ice_flow_calc_seg_sz()
688 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_UDP) in ice_flow_calc_seg_sz()
690 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_SCTP) in ice_flow_calc_seg_sz()
717 hdrs = prof->segs[i].hdrs; in ice_flow_proc_seg_hdrs()
914 flds = params->prof->segs[seg].fields; in ice_flow_xtract_fld()
1028 prot_id = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4) ? in ice_flow_xtract_fld()
1110 if (!params->prof->segs[seg].raws_cnt) in ice_flow_xtract_raws()
1113 if (params->prof->segs[seg].raws_cnt > in ice_flow_xtract_raws()
1114 ARRAY_SIZE(params->prof->segs[seg].raws)) in ice_flow_xtract_raws()
1124 for (i = 0; i < params->prof->segs[seg].raws_cnt; i++) { in ice_flow_xtract_raws()
1128 raw = ¶ms->prof->segs[seg].raws[i]; in ice_flow_xtract_raws()
1188 u64 match = params->prof->segs[i].match; in ice_flow_create_xtrct_seq()
1254 enum ice_flow_dir dir, struct ice_flow_seg_info *segs, in ice_flow_find_prof_conds() argument
1275 if (segs[i].hdrs != p->segs[i].hdrs || in ice_flow_find_prof_conds()
1277 segs[i].match != p->segs[i].match)) in ice_flow_find_prof_conds()
1361 struct ice_flow_seg_info *segs, u8 segs_cnt, in ice_flow_add_prof_sync() argument
1397 memcpy(¶ms->prof->segs[i], &segs[i], sizeof(*segs)); in ice_flow_add_prof_sync()
1541 u64 prof_id, struct ice_flow_seg_info *segs, u8 segs_cnt, in ice_flow_add_prof() argument
1552 if (!segs) in ice_flow_add_prof()
1555 status = ice_flow_val_hdrs(segs, segs_cnt); in ice_flow_add_prof()
1561 status = ice_flow_add_prof_sync(hw, blk, dir, prof_id, segs, segs_cnt, in ice_flow_add_prof()
1840 ice_flow_set_rss_seg_info(struct ice_flow_seg_info *segs, u64 hash_fields, in ice_flow_set_rss_seg_info() argument
1848 ice_flow_set_fld(segs, (enum ice_flow_field)i, in ice_flow_set_rss_seg_info()
1852 ICE_FLOW_SET_HDRS(segs, flow_hdr); in ice_flow_set_rss_seg_info()
1854 if (segs->hdrs & ~ICE_FLOW_RSS_SEG_HDR_VAL_MASKS & in ice_flow_set_rss_seg_info()
1858 val = (u64)(segs->hdrs & ICE_FLOW_RSS_SEG_HDR_L3_MASKS); in ice_flow_set_rss_seg_info()
1862 val = (u64)(segs->hdrs & ICE_FLOW_RSS_SEG_HDR_L4_MASKS); in ice_flow_set_rss_seg_info()
1950 if (r->hashed_flds == prof->segs[prof->segs_cnt - 1].match && in ice_rem_rss_list()
1951 r->packet_hdr == prof->segs[prof->segs_cnt - 1].hdrs) { in ice_rem_rss_list()
1975 if (r->hashed_flds == prof->segs[prof->segs_cnt - 1].match && in ice_add_rss_list()
1976 r->packet_hdr == prof->segs[prof->segs_cnt - 1].hdrs) { in ice_add_rss_list()
1986 rss_cfg->hashed_flds = prof->segs[prof->segs_cnt - 1].match; in ice_add_rss_list()
1987 rss_cfg->packet_hdr = prof->segs[prof->segs_cnt - 1].hdrs; in ice_add_rss_list()
2031 struct ice_flow_seg_info *segs; in ice_add_rss_cfg_sync() local
2037 segs = kcalloc(segs_cnt, sizeof(*segs), GFP_KERNEL); in ice_add_rss_cfg_sync()
2038 if (!segs) in ice_add_rss_cfg_sync()
2042 status = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds, in ice_add_rss_cfg_sync()
2051 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_add_rss_cfg_sync()
2063 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_add_rss_cfg_sync()
2083 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_add_rss_cfg_sync()
2098 segs[segs_cnt - 1].hdrs, in ice_add_rss_cfg_sync()
2100 segs, segs_cnt, &prof); in ice_add_rss_cfg_sync()
2116 kfree(segs); in ice_add_rss_cfg_sync()
2167 struct ice_flow_seg_info *segs; in ice_rem_rss_cfg_sync() local
2171 segs = kcalloc(segs_cnt, sizeof(*segs), GFP_KERNEL); in ice_rem_rss_cfg_sync()
2172 if (!segs) in ice_rem_rss_cfg_sync()
2176 status = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds, in ice_rem_rss_cfg_sync()
2181 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, in ice_rem_rss_cfg_sync()
2202 kfree(segs); in ice_rem_rss_cfg_sync()