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()
63 /* 0 is undefined ethtool flow */ in ice_fltr_to_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; in ice_fdir_rem_adq_chnl() local
305 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) { in ice_fdir_rem_adq_chnl()
306 struct ice_fd_hw_prof *prof = hw->fdir_prof[flow]; in ice_fdir_rem_adq_chnl()
327 /* find flow profile corresponding to prof_id and clear in ice_fdir_rem_adq_chnl()
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) in ice_fdir_get_hw_prof() argument
350 return hw->fdir_prof[flow]; in ice_fdir_get_hw_prof()
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) in ice_fdir_erase_flow_from_hw() argument
364 struct ice_fd_hw_prof *prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_erase_flow_from_hw()
392 * @flow_type: FDir flow type to release
398 int flow = (int)flow_type & ~FLOW_EXT; in ice_fdir_rem_flow() local
402 prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_rem_flow()
406 ice_fdir_erase_flow_from_hw(hw, blk, flow); in ice_fdir_rem_flow()
424 int flow; in ice_fdir_release_flows() local
426 /* release Flow Director HW table entries */ in ice_fdir_release_flows()
427 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) in ice_fdir_release_flows()
428 ice_fdir_erase_flow_from_hw(hw, ICE_BLK_FD, flow); in ice_fdir_release_flows()
432 * ice_fdir_replay_flows - replay HW Flow Director filter info
437 int flow; in ice_fdir_replay_flows() local
439 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) { in ice_fdir_replay_flows()
442 if (!hw->fdir_prof[flow] || !hw->fdir_prof[flow]->cnt) in ice_fdir_replay_flows()
449 prof = hw->fdir_prof[flow]; in ice_fdir_replay_flows()
466 dev_err(ice_hw_to_dev(hw), "Could not replay Flow Director, flow type %d\n", in ice_fdir_replay_flows()
467 flow); in ice_fdir_replay_flows()
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) in ice_fdir_alloc_flow_prof() argument
591 if (!hw->fdir_prof[flow]) { in ice_fdir_alloc_flow_prof()
592 hw->fdir_prof[flow] = devm_kzalloc(ice_hw_to_dev(hw), in ice_fdir_alloc_flow_prof()
595 if (!hw->fdir_prof[flow]) in ice_fdir_alloc_flow_prof()
604 * @prof: pointer to flow director HW profile
628 * @flow: filter enum
633 enum ice_fltr_ptype flow, enum ice_fd_hw_seg tun) in ice_fdir_set_hw_fltr_rule() argument
655 err = ice_fdir_alloc_flow_prof(hw, flow); in ice_fdir_set_hw_fltr_rule()
659 hw_prof = hw->fdir_prof[flow]; in ice_fdir_set_hw_fltr_rule()
669 /* if there are FDir filters using this flow, in ice_fdir_set_hw_fltr_rule()
672 if (hw->fdir_fltr_cnt[flow]) { in ice_fdir_set_hw_fltr_rule()
673 …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()
677 if (ice_is_arfs_using_perfect_flow(hw, flow)) { in ice_fdir_set_hw_fltr_rule()
678 dev_err(dev, "aRFS using perfect flow type %d, cannot change input set\n", in ice_fdir_set_hw_fltr_rule()
679 flow); in ice_fdir_set_hw_fltr_rule()
684 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_fdir_set_hw_fltr_rule()
729 dev_err(dev, "Could not add Channel VSI %d to flow group\n", in ice_fdir_set_hw_fltr_rule()
775 …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()
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) in ice_create_init_fdir_rule() argument
857 if (hw->fdir_prof && hw->fdir_prof[flow] && in ice_create_init_fdir_rule()
858 hw->fdir_prof[flow]->fdir_seg[0]) in ice_create_init_fdir_rule()
872 if (flow == ICE_FLTR_PTYPE_NONF_IPV4_TCP) in ice_create_init_fdir_rule()
875 else if (flow == ICE_FLTR_PTYPE_NONF_IPV4_UDP) in ice_create_init_fdir_rule()
878 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_TCP) in ice_create_init_fdir_rule()
881 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_UDP) in ice_create_init_fdir_rule()
890 ret = ice_fdir_set_hw_fltr_rule(pf, seg, flow, ICE_FD_HW_SEG_NON_TUN); in ice_create_init_fdir_rule()
897 ret = ice_fdir_set_hw_fltr_rule(pf, tun_seg, flow, ICE_FD_HW_SEG_TUN); in ice_create_init_fdir_rule()
904 set_bit(flow, hw->fdir_perfect_fltr); in ice_create_init_fdir_rule()
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
1205 * ice_fdir_vlan_valid - validate VLAN data for Flow Director rule
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"); in ice_set_ether_flow_seg()
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-ty… in ice_set_ether_flow_seg()
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
1595 dev_dbg(ice_pf_to_dev(pf), "Flow Director error %d, could not reprogram filter %d\n", in ice_fdir_replay_fltrs()
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; in ice_vsi_manage_fdir() local
1672 for (flow = ICE_FLTR_PTYPE_NONF_NONE; flow < ICE_FLTR_PTYPE_MAX; in ice_vsi_manage_fdir()
1673 flow++) in ice_vsi_manage_fdir()
1674 if (hw->fdir_prof[flow]) in ice_vsi_manage_fdir()
1675 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_vsi_manage_fdir()
1682 * ice_fdir_do_rem_flow - delete flow and possibly add perfect flow
1684 * @flow_type: FDir flow type to release
1757 * ice_del_fdir_ethtool - delete Flow Director filter
1759 * @cmd: command to add or delete Flow Director filter
1776 …dev_err(ice_pf_to_dev(pf), "Device is resetting - deleting Flow Director filters not supported dur… in ice_del_fdir_ethtool()
1824 * ice_set_fdir_input_set - Set the input set for Flow Director
1826 * @fsp: pointer to ethtool Rx flow specification
1855 …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()
1966 /* not doing un-parsed flow types */ in ice_set_fdir_input_set()
1974 * ice_add_fdir_ethtool - Add/Remove Flow Director filter
1976 * @cmd: command to add or delete Flow Director filter
2005 dev_err(dev, "Device is resetting - adding Flow Director filters not supported during reset\n"); in ice_add_fdir_ethtool()
2032 …dev_err(dev, "Failed to add filter. The maximum number of flow director filters has been reached.\… in ice_add_fdir_ethtool()