Lines Matching defs:flow

4 /* flow director ethtool support for ice */
36 * flow type values
37 * @flow: filter type to be converted
39 * Returns the corresponding ethtool flow type.
41 static int ice_fltr_to_ethtool_flow(enum ice_fltr_ptype flow)
43 switch (flow) {
63 /* 0 is undefined ethtool flow */
69 * ice_ethtool_flow_to_fltr - convert ethtool flow type to filter enum
70 * @eth: Ethtool flow type to be converted
72 * Returns flow enum
300 int status, flow;
305 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) {
306 struct ice_fd_hw_prof *prof = hw->fdir_prof[flow];
327 /* find flow profile corresponding to prof_id and clear
341 * ice_fdir_get_hw_prof - return the ice_fd_hw_proc associated with a flow
344 * @flow: FDir flow type to release
347 ice_fdir_get_hw_prof(struct ice_hw *hw, enum ice_block blk, int flow)
350 return hw->fdir_prof[flow];
356 * ice_fdir_erase_flow_from_hw - remove a flow from the HW profile tables
359 * @flow: FDir flow type to release
362 ice_fdir_erase_flow_from_hw(struct ice_hw *hw, enum ice_block blk, int flow)
364 struct ice_fd_hw_prof *prof = ice_fdir_get_hw_prof(hw, blk, flow);
392 * @flow_type: FDir flow type to release
398 int flow = (int)flow_type & ~FLOW_EXT;
402 prof = ice_fdir_get_hw_prof(hw, blk, flow);
406 ice_fdir_erase_flow_from_hw(hw, blk, flow);
424 int flow;
427 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++)
428 ice_fdir_erase_flow_from_hw(hw, ICE_BLK_FD, flow);
437 int flow;
439 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) {
442 if (!hw->fdir_prof[flow] || !hw->fdir_prof[flow]->cnt)
449 prof = hw->fdir_prof[flow];
466 dev_err(ice_hw_to_dev(hw), "Could not replay Flow Director, flow type %d\n",
467 flow);
479 * @fsp: pointer to ethtool Rx flow specification
524 * ice_fdir_num_avail_fltr - return the number of unused flow director filters
535 * Returns the number of available flow director filters to this VSI
569 * ice_fdir_alloc_flow_prof - allocate FDir flow profile structure(s)
570 * @hw: HW structure containing the FDir flow profile structure(s)
571 * @flow: flow type to allocate the flow profile for
573 * Allocate the fdir_prof and fdir_prof[flow] if not already created. Return 0
577 ice_fdir_alloc_flow_prof(struct ice_hw *hw, enum ice_fltr_ptype flow)
591 if (!hw->fdir_prof[flow]) {
592 hw->fdir_prof[flow] = devm_kzalloc(ice_hw_to_dev(hw),
595 if (!hw->fdir_prof[flow])
604 * @prof: pointer to flow director HW profile
628 * @flow: filter enum
633 enum ice_fltr_ptype flow, enum ice_fd_hw_seg tun)
655 err = ice_fdir_alloc_flow_prof(hw, flow);
659 hw_prof = hw->fdir_prof[flow];
669 /* if there are FDir filters using this flow,
672 if (hw->fdir_fltr_cnt[flow]) {
677 if (ice_is_arfs_using_perfect_flow(hw, flow)) {
678 dev_err(dev, "aRFS using perfect flow type %d, cannot change input set\n",
679 flow);
684 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow);
729 dev_err(dev, "Could not add Channel VSI %d to flow group\n",
782 * @seg: flow segment for programming
786 * Set the configuration for perfect filters to the provided flow segment for
844 * @flow: filter enum
849 ice_create_init_fdir_rule(struct ice_pf *pf, enum ice_fltr_ptype flow)
857 if (hw->fdir_prof && hw->fdir_prof[flow] &&
858 hw->fdir_prof[flow]->fdir_seg[0])
872 if (flow == ICE_FLTR_PTYPE_NONF_IPV4_TCP)
875 else if (flow == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
878 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_TCP)
881 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_UDP)
890 ret = ice_fdir_set_hw_fltr_rule(pf, seg, flow, ICE_FD_HW_SEG_NON_TUN);
897 ret = ice_fdir_set_hw_fltr_rule(pf, tun_seg, flow, ICE_FD_HW_SEG_TUN);
904 set_bit(flow, hw->fdir_perfect_fltr);
915 * @seg: flow segment for programming
921 * Set the mask data into the flow segment to be used to program HW
1001 * @seg: flow segment for programming
1006 * Set the offset data into the flow segment to be used to program HW
1056 * @seg: flow segment for programming
1062 * Set the mask data into the flow segment to be used to program HW
1147 * @seg: flow segment for programming
1152 * Set the offset data into the flow segment to be used to program HW
1207 * @fsp: pointer to ethtool Rx flow specification
1231 * ice_set_ether_flow_seg - set address and protocol segments for ether flow
1233 * @seg: flow segment for programming
1257 dev_warn(dev, "Only 0x0000 or 0xffff proto mask is allowed for flow-type ether");
1280 dev_warn(dev, "Only 00:00:00:00:00:00 or ff:ff:ff:ff:ff:ff MAC address mask is allowed for flow-type ether");
1285 * ice_set_fdir_vlan_seg - set vlan segments for ether flow
1286 * @seg: flow segment for programming
1287 * @ext_masks: masks for additional RX flow fields
1323 * @fsp: pointer to ethtool Rx flow specification
1324 * @user: user defined data from flow specification
1484 * ice_fdir_write_fltr - send a flow director filter to the hardware
1555 * ice_fdir_write_all_fltr - send a flow director filter to the hardware
1629 * ice_fdir_del_all_fltrs - Delete all flow director filters
1649 * ice_vsi_manage_fdir - turn on/off flow director
1657 enum ice_fltr_ptype flow;
1672 for (flow = ICE_FLTR_PTYPE_NONF_NONE; flow < ICE_FLTR_PTYPE_MAX;
1673 flow++)
1674 if (hw->fdir_prof[flow])
1675 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow);
1682 * ice_fdir_do_rem_flow - delete flow and possibly add perfect flow
1684 * @flow_type: FDir flow type to release
1826 * @fsp: pointer to ethtool Rx flow specification
1965 /* not doing un-parsed flow types */
2031 dev_err(dev, "Failed to add filter. The maximum number of flow director filters has been reached.\n");