Lines Matching full: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) in ice_fltr_to_ethtool_flow() argument
43 switch (flow) { in ice_fltr_to_ethtool_flow()
61 /* 0 is undefined ethtool flow */ in ice_fltr_to_ethtool_flow()
67 * ice_ethtool_flow_to_fltr - convert ethtool flow type to filter enum
68 * @eth: Ethtool flow type to be converted
70 * Returns flow enum
292 int status, flow; in ice_fdir_rem_adq_chnl() local
297 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) { in ice_fdir_rem_adq_chnl()
298 struct ice_fd_hw_prof *prof = hw->fdir_prof[flow]; in ice_fdir_rem_adq_chnl()
319 /* find flow profile corresponding to prof_id and clear in ice_fdir_rem_adq_chnl()
333 * ice_fdir_get_hw_prof - return the ice_fd_hw_proc associated with a flow
336 * @flow: FDir flow type to release
339 ice_fdir_get_hw_prof(struct ice_hw *hw, enum ice_block blk, int flow) in ice_fdir_get_hw_prof() argument
342 return hw->fdir_prof[flow]; in ice_fdir_get_hw_prof()
348 * ice_fdir_erase_flow_from_hw - remove a flow from the HW profile tables
351 * @flow: FDir flow type to release
354 ice_fdir_erase_flow_from_hw(struct ice_hw *hw, enum ice_block blk, int flow) in ice_fdir_erase_flow_from_hw() argument
356 struct ice_fd_hw_prof *prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_erase_flow_from_hw()
384 * @flow_type: FDir flow type to release
390 int flow = (int)flow_type & ~FLOW_EXT; in ice_fdir_rem_flow() local
394 prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_rem_flow()
398 ice_fdir_erase_flow_from_hw(hw, blk, flow); in ice_fdir_rem_flow()
416 int flow; in ice_fdir_release_flows() local
418 /* release Flow Director HW table entries */ in ice_fdir_release_flows()
419 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) in ice_fdir_release_flows()
420 ice_fdir_erase_flow_from_hw(hw, ICE_BLK_FD, flow); in ice_fdir_release_flows()
424 * ice_fdir_replay_flows - replay HW Flow Director filter info
429 int flow; in ice_fdir_replay_flows() local
431 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) { in ice_fdir_replay_flows()
434 if (!hw->fdir_prof[flow] || !hw->fdir_prof[flow]->cnt) in ice_fdir_replay_flows()
441 prof = hw->fdir_prof[flow]; in ice_fdir_replay_flows()
458 dev_err(ice_hw_to_dev(hw), "Could not replay Flow Director, flow type %d\n", in ice_fdir_replay_flows()
459 flow); in ice_fdir_replay_flows()
471 * @fsp: pointer to ethtool Rx flow specification
516 * ice_fdir_num_avail_fltr - return the number of unused flow director filters
527 * Returns the number of available flow director filters to this VSI
561 * ice_fdir_alloc_flow_prof - allocate FDir flow profile structure(s)
562 * @hw: HW structure containing the FDir flow profile structure(s)
563 * @flow: flow type to allocate the flow profile for
565 * Allocate the fdir_prof and fdir_prof[flow] if not already created. Return 0
569 ice_fdir_alloc_flow_prof(struct ice_hw *hw, enum ice_fltr_ptype flow) in ice_fdir_alloc_flow_prof() argument
583 if (!hw->fdir_prof[flow]) { in ice_fdir_alloc_flow_prof()
584 hw->fdir_prof[flow] = devm_kzalloc(ice_hw_to_dev(hw), in ice_fdir_alloc_flow_prof()
587 if (!hw->fdir_prof[flow]) in ice_fdir_alloc_flow_prof()
596 * @prof: pointer to flow director HW profile
620 * @flow: filter enum
625 enum ice_fltr_ptype flow, enum ice_fd_hw_seg tun) in ice_fdir_set_hw_fltr_rule() argument
647 err = ice_fdir_alloc_flow_prof(hw, flow); in ice_fdir_set_hw_fltr_rule()
651 hw_prof = hw->fdir_prof[flow]; in ice_fdir_set_hw_fltr_rule()
661 /* if there are FDir filters using this flow, in ice_fdir_set_hw_fltr_rule()
664 if (hw->fdir_fltr_cnt[flow]) { in ice_fdir_set_hw_fltr_rule()
665 …dev_err(dev, "Failed to add filter. Flow director filters on each port must have the same input se… in ice_fdir_set_hw_fltr_rule()
669 if (ice_is_arfs_using_perfect_flow(hw, flow)) { in ice_fdir_set_hw_fltr_rule()
670 dev_err(dev, "aRFS using perfect flow type %d, cannot change input set\n", in ice_fdir_set_hw_fltr_rule()
671 flow); in ice_fdir_set_hw_fltr_rule()
676 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_fdir_set_hw_fltr_rule()
721 dev_err(dev, "Could not add Channel VSI %d to flow group\n", in ice_fdir_set_hw_fltr_rule()
767 …dev_err(dev, "Failed to add filter. Flow director filters on each port must have the same input se… in ice_fdir_set_hw_fltr_rule()
774 * @seg: flow segment for programming
778 * Set the configuration for perfect filters to the provided flow segment for
836 * @flow: filter enum
841 ice_create_init_fdir_rule(struct ice_pf *pf, enum ice_fltr_ptype flow) in ice_create_init_fdir_rule() argument
849 if (hw->fdir_prof && hw->fdir_prof[flow] && in ice_create_init_fdir_rule()
850 hw->fdir_prof[flow]->fdir_seg[0]) in ice_create_init_fdir_rule()
864 if (flow == ICE_FLTR_PTYPE_NONF_IPV4_TCP) in ice_create_init_fdir_rule()
867 else if (flow == ICE_FLTR_PTYPE_NONF_IPV4_UDP) in ice_create_init_fdir_rule()
870 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_TCP) in ice_create_init_fdir_rule()
873 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_UDP) in ice_create_init_fdir_rule()
882 ret = ice_fdir_set_hw_fltr_rule(pf, seg, flow, ICE_FD_HW_SEG_NON_TUN); in ice_create_init_fdir_rule()
889 ret = ice_fdir_set_hw_fltr_rule(pf, tun_seg, flow, ICE_FD_HW_SEG_TUN); in ice_create_init_fdir_rule()
896 set_bit(flow, hw->fdir_perfect_fltr); in ice_create_init_fdir_rule()
907 * @seg: flow segment for programming
913 * Set the mask data into the flow segment to be used to program HW
993 * @seg: flow segment for programming
998 * Set the offset data into the flow segment to be used to program HW
1048 * @seg: flow segment for programming
1054 * Set the mask data into the flow segment to be used to program HW
1139 * @seg: flow segment for programming
1144 * Set the offset data into the flow segment to be used to program HW
1199 * @fsp: pointer to ethtool Rx flow specification
1200 * @user: user defined data from flow specification
1350 * ice_fdir_write_fltr - send a flow director filter to the hardware
1421 * ice_fdir_write_all_fltr - send a flow director filter to the hardware
1461 dev_dbg(ice_pf_to_dev(pf), "Flow Director error %d, could not reprogram filter %d\n", in ice_fdir_replay_fltrs()
1495 * ice_fdir_del_all_fltrs - Delete all flow director filters
1515 * ice_vsi_manage_fdir - turn on/off flow director
1523 enum ice_fltr_ptype flow; in ice_vsi_manage_fdir() local
1538 for (flow = ICE_FLTR_PTYPE_NONF_NONE; flow < ICE_FLTR_PTYPE_MAX; in ice_vsi_manage_fdir()
1539 flow++) in ice_vsi_manage_fdir()
1540 if (hw->fdir_prof[flow]) in ice_vsi_manage_fdir()
1541 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_vsi_manage_fdir()
1548 * ice_fdir_do_rem_flow - delete flow and possibly add perfect flow
1550 * @flow_type: FDir flow type to release
1623 * ice_del_fdir_ethtool - delete Flow Director filter
1625 * @cmd: command to add or delete Flow Director filter
1642 …dev_err(ice_pf_to_dev(pf), "Device is resetting - deleting Flow Director filters not supported dur… in ice_del_fdir_ethtool()
1690 * ice_set_fdir_input_set - Set the input set for Flow Director
1692 * @fsp: pointer to ethtool Rx flow specification
1720 …dev_err(ice_pf_to_dev(pf), "Failed to add filter. Flow director filters are not supported on VF qu… in ice_set_fdir_input_set()
1827 /* not doing un-parsed flow types */ in ice_set_fdir_input_set()
1835 * ice_add_fdir_ethtool - Add/Remove Flow Director filter
1837 * @cmd: command to add or delete Flow Director filter
1866 dev_err(dev, "Device is resetting - adding Flow Director filters not supported during reset\n"); in ice_add_fdir_ethtool()
1893 …dev_err(dev, "Failed to add filter. The maximum number of flow director filters has been reached.\… in ice_add_fdir_ethtool()