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()
307 prof_id = flow + tun * ICE_FLTR_PTYPE_MAX; in ice_fdir_rem_adq_chnl()
321 /* find flow profile corresponding to prof_id and clear in ice_fdir_rem_adq_chnl()
335 * ice_fdir_get_hw_prof - return the ice_fd_hw_proc associated with a flow
338 * @flow: FDir flow type to release
341 ice_fdir_get_hw_prof(struct ice_hw *hw, enum ice_block blk, int flow) in ice_fdir_get_hw_prof() argument
344 return hw->fdir_prof[flow]; in ice_fdir_get_hw_prof()
350 * ice_fdir_erase_flow_from_hw - remove a flow from the HW profile tables
353 * @flow: FDir flow type to release
356 ice_fdir_erase_flow_from_hw(struct ice_hw *hw, enum ice_block blk, int flow) in ice_fdir_erase_flow_from_hw() argument
358 struct ice_fd_hw_prof *prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_erase_flow_from_hw()
368 prof_id = flow + tun * ICE_FLTR_PTYPE_MAX; in ice_fdir_erase_flow_from_hw()
387 * @flow_type: FDir flow type to release
393 int flow = (int)flow_type & ~FLOW_EXT; in ice_fdir_rem_flow() local
397 prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_rem_flow()
401 ice_fdir_erase_flow_from_hw(hw, blk, flow); in ice_fdir_rem_flow()
419 int flow; in ice_fdir_release_flows() local
421 /* release Flow Director HW table entries */ in ice_fdir_release_flows()
422 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) in ice_fdir_release_flows()
423 ice_fdir_erase_flow_from_hw(hw, ICE_BLK_FD, flow); in ice_fdir_release_flows()
427 * ice_fdir_replay_flows - replay HW Flow Director filter info
432 int flow; in ice_fdir_replay_flows() local
434 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) { in ice_fdir_replay_flows()
437 if (!hw->fdir_prof[flow] || !hw->fdir_prof[flow]->cnt) in ice_fdir_replay_flows()
445 prof = hw->fdir_prof[flow]; in ice_fdir_replay_flows()
446 prof_id = flow + tun * ICE_FLTR_PTYPE_MAX; in ice_fdir_replay_flows()
463 dev_err(ice_hw_to_dev(hw), "Could not replay Flow Director, flow type %d\n", in ice_fdir_replay_flows()
464 flow); in ice_fdir_replay_flows()
475 * @fsp: pointer to ethtool Rx flow specification
521 * ice_fdir_num_avail_fltr - return the number of unused flow director filters
532 * Returns the number of available flow director filters to this VSI
558 * ice_fdir_alloc_flow_prof - allocate FDir flow profile structure(s)
559 * @hw: HW structure containing the FDir flow profile structure(s)
560 * @flow: flow type to allocate the flow profile for
562 * Allocate the fdir_prof and fdir_prof[flow] if not already created. Return 0
566 ice_fdir_alloc_flow_prof(struct ice_hw *hw, enum ice_fltr_ptype flow) in ice_fdir_alloc_flow_prof() argument
580 if (!hw->fdir_prof[flow]) { in ice_fdir_alloc_flow_prof()
581 hw->fdir_prof[flow] = devm_kzalloc(ice_hw_to_dev(hw), in ice_fdir_alloc_flow_prof()
584 if (!hw->fdir_prof[flow]) in ice_fdir_alloc_flow_prof()
593 * @prof: pointer to flow director HW profile
617 * @flow: filter enum
622 enum ice_fltr_ptype flow, enum ice_fd_hw_seg tun) in ice_fdir_set_hw_fltr_rule() argument
645 err = ice_fdir_alloc_flow_prof(hw, flow); in ice_fdir_set_hw_fltr_rule()
649 hw_prof = hw->fdir_prof[flow]; in ice_fdir_set_hw_fltr_rule()
659 /* if there are FDir filters using this flow, in ice_fdir_set_hw_fltr_rule()
662 if (hw->fdir_fltr_cnt[flow]) { in ice_fdir_set_hw_fltr_rule()
663 …dev_err(dev, "Failed to add filter. Flow director filters on each port must have the same input s… in ice_fdir_set_hw_fltr_rule()
667 if (ice_is_arfs_using_perfect_flow(hw, flow)) { in ice_fdir_set_hw_fltr_rule()
668 dev_err(dev, "aRFS using perfect flow type %d, cannot change input set\n", in ice_fdir_set_hw_fltr_rule()
669 flow); in ice_fdir_set_hw_fltr_rule()
674 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_fdir_set_hw_fltr_rule()
681 prof_id = flow + tun * ICE_FLTR_PTYPE_MAX; in ice_fdir_set_hw_fltr_rule()
719 dev_err(dev, "Could not add Channel VSI %d to flow group\n", in ice_fdir_set_hw_fltr_rule()
765 …dev_err(dev, "Failed to add filter. Flow director filters on each port must have the same input s… in ice_fdir_set_hw_fltr_rule()
772 * @seg: flow segment for programming
776 * Set the configuration for perfect filters to the provided flow segment for
834 * @flow: filter enum
839 ice_create_init_fdir_rule(struct ice_pf *pf, enum ice_fltr_ptype flow) in ice_create_init_fdir_rule() argument
847 if (hw->fdir_prof && hw->fdir_prof[flow] && in ice_create_init_fdir_rule()
848 hw->fdir_prof[flow]->fdir_seg[0]) in ice_create_init_fdir_rule()
862 if (flow == ICE_FLTR_PTYPE_NONF_IPV4_TCP) in ice_create_init_fdir_rule()
865 else if (flow == ICE_FLTR_PTYPE_NONF_IPV4_UDP) in ice_create_init_fdir_rule()
868 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_TCP) in ice_create_init_fdir_rule()
871 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_UDP) in ice_create_init_fdir_rule()
880 ret = ice_fdir_set_hw_fltr_rule(pf, seg, flow, ICE_FD_HW_SEG_NON_TUN); in ice_create_init_fdir_rule()
887 ret = ice_fdir_set_hw_fltr_rule(pf, tun_seg, flow, ICE_FD_HW_SEG_TUN); in ice_create_init_fdir_rule()
894 set_bit(flow, hw->fdir_perfect_fltr); in ice_create_init_fdir_rule()
905 * @seg: flow segment for programming
911 * Set the mask data into the flow segment to be used to program HW
991 * @seg: flow segment for programming
996 * Set the offset data into the flow segment to be used to program HW
1046 * @seg: flow segment for programming
1052 * Set the mask data into the flow segment to be used to program HW
1137 * @seg: flow segment for programming
1142 * Set the offset data into the flow segment to be used to program HW
1197 * @fsp: pointer to ethtool Rx flow specification
1198 * @user: user defined data from flow specification
1348 * ice_fdir_write_fltr - send a flow director filter to the hardware
1419 * ice_fdir_write_all_fltr - send a flow director filter to the hardware
1459 dev_dbg(ice_pf_to_dev(pf), "Flow Director error %d, could not reprogram filter %d\n", in ice_fdir_replay_fltrs()
1493 * ice_fdir_del_all_fltrs - Delete all flow director filters
1513 * ice_vsi_manage_fdir - turn on/off flow director
1521 enum ice_fltr_ptype flow; in ice_vsi_manage_fdir() local
1536 for (flow = ICE_FLTR_PTYPE_NONF_NONE; flow < ICE_FLTR_PTYPE_MAX; in ice_vsi_manage_fdir()
1537 flow++) in ice_vsi_manage_fdir()
1538 if (hw->fdir_prof[flow]) in ice_vsi_manage_fdir()
1539 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_vsi_manage_fdir()
1546 * ice_fdir_do_rem_flow - delete flow and possibly add perfect flow
1548 * @flow_type: FDir flow type to release
1621 * ice_del_fdir_ethtool - delete Flow Director filter
1623 * @cmd: command to add or delete Flow Director filter
1640 …dev_err(ice_pf_to_dev(pf), "Device is resetting - deleting Flow Director filters not supported dur… in ice_del_fdir_ethtool()
1688 * ice_set_fdir_input_set - Set the input set for Flow Director
1690 * @fsp: pointer to ethtool Rx flow specification
1719 …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()
1826 /* not doing un-parsed flow types */ in ice_set_fdir_input_set()
1834 * ice_add_fdir_ethtool - Add/Remove Flow Director filter
1836 * @cmd: command to add or delete Flow Director filter
1864 dev_err(dev, "Device is resetting - adding Flow Director filters not supported during reset\n"); in ice_add_fdir_ethtool()
1881 …dev_err(dev, "Failed to add filter. The maximum number of flow director filters has been reached.… in ice_add_fdir_ethtool()
1889 …dev_err(dev, "Failed to add filter. The maximum number of flow director filters has been reached.… in ice_add_fdir_ethtool()