Lines Matching refs:segs

624  * @segs: array of one or more packet segments that describe the flow
627 static int ice_flow_val_hdrs(struct ice_flow_seg_info *segs, u8 segs_cnt)
633 if (segs[i].hdrs & ICE_FLOW_SEG_HDRS_L3_MASK &&
634 !is_power_of_2(segs[i].hdrs & ICE_FLOW_SEG_HDRS_L3_MASK))
638 if (segs[i].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK &&
639 !is_power_of_2(segs[i].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK))
667 sz = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_VLAN) ?
671 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4)
673 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV6)
675 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ARP)
677 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK)
682 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ICMP)
684 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_TCP)
686 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_UDP)
688 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_SCTP)
714 hdrs = prof->segs[i].hdrs;
911 flds = params->prof->segs[seg].fields;
1025 prot_id = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4) ?
1107 if (!params->prof->segs[seg].raws_cnt)
1110 if (params->prof->segs[seg].raws_cnt >
1111 ARRAY_SIZE(params->prof->segs[seg].raws))
1121 for (i = 0; i < params->prof->segs[seg].raws_cnt; i++) {
1125 raw = &params->prof->segs[seg].raws[i];
1185 u64 match = params->prof->segs[i].match;
1245 * @segs: array of one or more packet segments that describe the flow
1253 enum ice_flow_dir dir, struct ice_flow_seg_info *segs,
1279 if (segs[i].hdrs != p->segs[i].hdrs ||
1281 segs[i].match != p->segs[i].match))
1338 * @segs: array of one or more packet segments that describe the flow
1348 struct ice_flow_seg_info *segs, u8 segs_cnt,
1392 memcpy(&params->prof->segs[i], &segs[i], sizeof(*segs));
1531 * @segs: array of one or more packet segments that describe the flow
1538 struct ice_flow_seg_info *segs, u8 segs_cnt,
1549 if (!segs)
1552 status = ice_flow_val_hdrs(segs, segs_cnt);
1558 status = ice_flow_add_prof_sync(hw, blk, dir, segs, segs_cnt,
1874 * @segs: pointer to the flow field segment(s)
1883 ice_flow_set_rss_seg_info(struct ice_flow_seg_info *segs, u8 seg_cnt,
1891 seg = &segs[seg_cnt - 1];
1903 segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV4 |
1906 segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV6 |
1999 s = &prof->segs[ICE_RSS_OUTER_HEADERS];
2016 r->hash.hash_flds == prof->segs[prof->segs_cnt - 1].match &&
2017 r->hash.addl_hdrs == prof->segs[prof->segs_cnt - 1].hdrs);
2076 rss_cfg->hash.hash_flds = prof->segs[prof->segs_cnt - 1].match;
2077 rss_cfg->hash.addl_hdrs = prof->segs[prof->segs_cnt - 1].hdrs;
2176 seg = &prof->segs[prof->segs_cnt - 1];
2234 struct ice_flow_seg_info *segs;
2241 segs = kcalloc(segs_cnt, sizeof(*segs), GFP_KERNEL);
2242 if (!segs)
2246 status = ice_flow_set_rss_seg_info(segs, segs_cnt, cfg);
2254 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
2267 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
2288 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
2301 segs, segs_cnt, cfg->symm, &prof);
2319 kfree(segs);
2381 struct ice_flow_seg_info *segs;
2388 segs = kcalloc(segs_cnt, sizeof(*segs), GFP_KERNEL);
2389 if (!segs)
2393 status = ice_flow_set_rss_seg_info(segs, segs_cnt, cfg);
2397 prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
2418 kfree(segs);